Re: Oracle Text: File datastore- what do I do wrong?)

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: Mon, 16 Nov 2009 05:09:06 -0800 (PST)
Message-ID: <b0cf670e-ac7f-40e7-baab-b9f1956547c3_at_c3g2000yqd.googlegroups.com>



On Nov 16, 1:12 am, Clarke <m.derk..._at_gmail.com> wrote:

snip

> Hi!
> Im trying to index .doc and .txt files using Oracle Text:
>
> begin
>  ctx_ddl.create_preference('COMMON_DIR','FILE_DATASTORE');
>  ctx_ddl.set_attribute('COMMON_DIR','PATH','/home/max/doc');
> end;
>
> create table mytable(id number primary key, docs varchar2(2000));
> insert into mytable values(111555,'1.txt');
> insert into mytable values(111556,'best.doc');
> commit;
>
> create index myindex on mytable(docs)
>   indextype is ctxsys.context
>   parameters ('datastore COMMON_DIR');
>
> And the query
>
> SELECT SCORE(1), id, docs FROM mytable WHERE CONTAINS(docs, 'Solaris',
> 1) > 0;
>
> ...gives nothhing (doth documents contain "Solaris")
>
> What do I do wrong?

Did I do?

Is this an example from somewhere if so please provide the reference.

Have you looked at the oracle documentation for text indexes?

You can check at how many rows are in the text index to see if anything was actually inserted corresponding to the documents that you apparently believe were loaded. Received on Mon Nov 16 2009 - 07:09:06 CST

Original text of this message