Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: "google search" using Oracle Text
ichow2_at_hotmail.com wrote:
> Niall, ABOUT will not work well. It does searches using Theme.
>
> SQL>select * from mytab;
> MYID MYTEXT
> ---------- --------------------
> 1 DIESEL ENGINE
> 2 AUTO ENGINE PARTS
> 4 ENG FOR SALE
> 5 GOOGLE SEARCH ENGINE
> 6 VOLVO ENGINE
>
> 5 rows selected.
>
> SQL>select mytext, score(1) from mytab where contains (mytext, 'about
> (car)',1)>1;
> MYTEXT SCORE(1)
> -------------------- ----------
> AUTO ENGINE PARTS 100
>
> 1 row selected.
>
> Even though the query above does not contain any of the tokens "AUTO",
> "ENGINE" or "PARTS", a record is still returned.
>
> SQL> select mytext,score(1) from mytab where contains (mytext, 'about(GOOGLE
> SEARCH ENGINE)',1)>1;
> MYTEXT SCORE(1)
> -------------------- ----------
> GOOGLE SEARCH ENGINE 84
>
> 1 row selected.
>
> If I were to search on "GOOGLE SEARCH ENGINE", it returns only one record. I
> want it to return all of the following records (any records that contains
> "GOOGLE SEARCH ENGINE", "GOOGLE","SEARCH", "ENGINE"):
>
> 1 DIESEL ENGINE
> 2 AUTO ENGINE PARTS
> 5 GOOGLE SEARCH ENGINE
> 6 VOLVO ENGINE
>
Then you need to search on all of those, not for
just the entry, that has all of them at once:
contains('google search engine') means:
goolgle AND serach AND engine. Yes, a space
is actually an AND!
contains ('google,search,engine') means:
google OR search OR engine.
Your score will be higher for text having
google as well as engine.
Oracle Text Reference guide seems in place.
-- Regards, Frank van Bortel ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon Apr 19 2004 - 13:31:57 CDT
![]() |
![]() |