Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Query for InterMedia Text

Re: Query for InterMedia Text

From: Joel R. Kallman <jkallman_at_us.oracle.com>
Date: Mon, 08 Nov 1999 14:40:06 GMT
Message-ID: <3826dfaa.9936527@newshost.us.oracle.com>


Sixuan,

If you define the asterisk as your printjoin character, interMedia Text will included the '*' with the token in the Text index. You can define this as a lexer preference, and then reference this preference when creating your interMedia Text index.

As an example:

Without printjoins



SQL> create table foo (id number primary key, text varchar2(255)); Table created.

SQL> insert into foo values(1,'Joel likes working with databases'); 1 row created.

SQL> insert into foo values(2,'Will this find the term *database in the text');
1 row created.

SQL> insert into foo values(3,'Oracle makes a cool database'); 1 row created.

SQL> commit;
Commit complete.

SQL> create index foo_idx on foo(text) indextype is ctxsys.context; Index created.

SQL> select score(10), id from foo where contains(text,'\*database',10) > 0;

 SCORE(10) ID

         4 2

         4 3

With printjoins



SQL> drop index foo_idx;
Index dropped.

SQL> begin
  2 ctx_ddl.create_preference('joels_lexer','BASIC_LEXER');   3 ctx_ddl.set_attribute('joels_lexer','printjoins','*');   4 end;
  5 /
PL/SQL procedure successfully completed.

SQL> create index foo_idx on foo(text) indextype is ctxsys.context parameters('lexer joels_lexer');
Index created.

SQL> select score(10), id from foo where contains(text,'\*database',10) > 0;

 SCORE(10) ID

         4 2

Hope this helps.
On Sun, 7 Nov 1999 21:57:07 -0800, " àV" <szhong_at_attglobal.net> wrote:

>I am developing an application that uses InterMedia Text and accept searches
>like:
>
>*database
>programming language-A*P
>
>These words and phrases are included in more than 2,000,000 documents. We
>were told that when searching for
>
>*database
>
>the user is looking for only <*database> and not <database>.
>
>When I did
>
>\*database
>
>all documents with *database and database were returned. Further more
>documents with <*database> do not get higher score than the ones with
><database>.
>
>Thank you in advance for solutions or ideas.
>
>Sixuan
>
>
>
>
>
>

Thanks!

Joel

Joel R. Kallman Oracle Service Industries

Columbus, OH                             http://govt.us.oracle.com

jkallman@us.oracle.com                   http://www.oracle.com




The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. Received on Mon Nov 08 1999 - 08:40:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US