Page 1 of 1

Oracle Text?

Posted: Thu 04 Nov 2010 19:09
by llappall
Hello,

I found that searching for "Oracle Text" is quite a pain! :)
They should have come up with a weird acronysm...

Anyway, Does anybody know if there's support in Entity & Linq for Oracle Text queries? Specifically, I'm looking for "contains" queries.

I found that if I use OracleDataTable, I can pass the query straight, but I wanted to use Oracle Text straight if possible.

Thanks
Llappall

Posted: Fri 05 Nov 2010 12:21
by StanislavK
You can use CONTAINS queries in LinqConnect. To do so, a method wrapping the CONTAINS SQL function should be created in the model. I will send you a test project where this wrapper method is defined, and a simple query with CONTAINS is executed.

Please check that the letter with the sample is not blocked by your mail filter. The database objects used in the sample are created as

Code: Select all

CREATE TABLE TestOracleText (
  ID NUMBER(38),
  VAL VARCHAR2(256),
  CONSTRAINT PK_TESTORACLETEXT PRIMARY KEY (ID)
  );

INSERT INTO TestOracleText VALUES (10, 'Some data');
INSERT INTO TestOracleText VALUES (20, 'Empty string');
INSERT INTO TestOracleText VALUES (30, 'Some more data');

CREATE INDEX TestOracleText_Index ON TestOracleText (VAL);

Thanks StanislavK!

Posted: Fri 05 Nov 2010 20:35
by llappall
Hi,
thank you for answering.
I did not received the letter with the sample.
Is there any online examples I could see?

Thanks
llappall

Posted: Mon 08 Nov 2010 12:53
by StanislavK
I've sent you the sample again. Please remove the second extension of the archive file.

If this letter is blocked as well, could you please specify another e-mail address (you can use our contact form for this) to which we can send the sample?

Posted: Mon 18 Apr 2011 13:47
by osavioro
Can You send me the sample too.
I will provide email through PM.

P.S. I guess that PM is not an option. So please can you send me the sample to the email used for registration.

Posted: Tue 19 Apr 2011 09:11
by StanislavK
I've sent the test project to both addresses you've specified, please check that the letters were not blocked by your mail filter.

To use, e.g., the CONTAINS Oracle function, you can wrap it with a model method (say, 'Contains'). After that, it will be possible to use this method in your LINQ queries, like

Code: Select all

from myEntity in context.MyEntities
where context.Contains(myEntity.Field1, "some value") > 0 
select myEntity;
Such queries will be translated into the SQL including the CONTAINS invocation.

Please tell us if this helps.

Posted: Mon 17 Oct 2011 09:44
by sylfeline
Hello
I have exactly the same problem (perform a oracle fulltext with "contains" function), can you post code here ? (or send me a email)
Or is there a new easier solution ?

Thanks
Sylfeline

Posted: Wed 19 Oct 2011 11:38
by StanislavK
I've sent you a sample, please check that it is not blocked by your mail filter. The point is to create the wrapper method in the model:
- open the Model Explorer tool window of Entity Developer;
- right-click the Methods node and select the 'Add Method' item from the shortcut menu;
- manually add two string parameters (the column being searched and the search expression);
- set the 'source' property to 'contains'.
In this way, this new method will be mapped to the full-text search CONTAINS function.

At the moment, LinqConnect provides no implicit translation into the CONTAINS function.