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: ignore keywords in the CONTAINS??

Re: ignore keywords in the CONTAINS??

From: travis <travis_brooks_at_hotmail.com>
Date: 18 Jun 2004 23:43:53 -0700
Message-ID: <c79acf51.0406182243.792695ad@posting.google.com>


no, i'm using the "contains" expression, its part of the full text search for the Oracle InterMedia. The queries can take different forms, but the basic idea is something like:

select /*stuff*/
from /*some joins*/
where contains(theColumnWithTheContextIndex, 'your search phrase here') > 0;

The documentation on the "contains" seemed a little thin. Its clear that there is what amounts to a whole expression language that you can embed where i said 'your search phrase here' above, but whats not clear is how you call out that something that is a keyword in this expression language should in fact be treated as a word you're looking for (i.e. 'not' means i want to search for the word 'not', rather than insert a negation in the search phrase).

-travis

Michael Austin <maustin_at_firstdbasource.com> wrote in message news:<xdIAc.7080$aK1.4567_at_newssvr22.news.prodigy.com>...
> travis wrote:
>
> > We have been trying to figure out how to get the contains function to
> > recognize an input like:
> >
> > "DOES NOT OPERATE"
> >
> > where it treats the "NOT" as a word to search for, not interpretting
> > it as a special ~ operator.
> >
> > we're using oracle version 9.2.0.4.
> >
> > thanks
> >
> > -travis brooks
>
>
> can we see how it is represented in the code?
>
> I would guess you are trying to do something like:
>
> select a from b where a contains 'DOES NOT OPERATE';
>
> try using like to see if you get the same results:
>
> select a from b where a like '%does not operate%';
>
> Are you getting an error message (if so, what is it??)
>
> If this persists, you might submit TAR to see if this expected behavior
> I would think that this is a bug -- anything inside the quoted string
> should be treated as text not an operator. Note the single tick-marks.
>
> Michael Austin.
> DBA Consultant. Need one??
Received on Sat Jun 19 2004 - 01:43:53 CDT

Original text of this message

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