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: Intermedia Query Question

Re: Intermedia Query Question

From: Ronnie <ronnie_yours_at_yahoo.com>
Date: 16 Jul 2004 07:43:41 -0700
Message-ID: <ea603f8d.0407160643.14bf928c@posting.google.com>


Oops,

Actually I was searching for

select * from testtable where contains (dummy,'tom trisha')>0;

Jeremy <newspostings_at_hazelweb.co.uk> wrote in message news:<MPG.1b60ba02c8caed19989c9d_at_news.individual.net>...
> In article <ea603f8d.0407150720.a30896c_at_posting.google.com>, Ronnie
> says...
> > Hi,
> >
> > I have a table such that
> >
> > SQL> desc testtable
> > Name Type Nullable Default Comments
> > ----- ------------ -------- ------- --------
> > DUMMY VARCHAR2(50) Y
> >
> > SQL> select * from testtable
> > 2 /
> >
> > DUMMY
> > --------------------------------------------------
> > tom
> > trisha
> > nancy
> > tom trisha
> > nancy trisha
> > nancy tom
> > tom nancy
> > tom nancy trisha
> > trisha tom nancy
> >
> >
> > I create an intermedia textindex on the table using the command
> >
> >
> > create index testindex on testtable(dummy) indextype is
> > ctxsys.context;
> >
> >
> > Now when i issue a query such as
> >
> >
> > SQL> select * from testtable where contains (dummy,'anurag trisha')>0;
> >
> > DUMMY
> > --------------------------------------------------
> > tom trisha
> >
> >
> > It matches the whole string. The results I am expecting is
> >
> > DUMMY
> > --------------------------------------------------
> > tom trisha
> > tom nancy trisha
> > trisha tom nancy
> >
> > That is in the beginning it should list the records wherever tom
> > trisha exist next to each other and later at the end it should bring
> > all the records where both tom and trisha exist even though they are
> > not next to each other.
> >
> > Please suggest.
>
>
> Well I don't see the value 'anurag' anywhere in your data so don't
> understand how you got any rows back at all. Unless I am being very
> thick.
>
> Simply:
>
> contains(dummy,'a b') >0
> - match only those rows containing words a and b adjacent to each other
>
> contains(dummy,'a,b') >0
> - match only those rows containing words a or b and assign a higher
> score to those records which contain both
>
> contains(dummy,'a or b') >0
> - match only those rows containing words a or b and score equally
>
> There is a whole chapter on how all this works somewhere in the
> documentation (not sure which maual it resides in).
>
> hope that is slightly helpful
Received on Fri Jul 16 2004 - 09:43:41 CDT

Original text of this message

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