Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> "google search" using Oracle Text
Hi,
I'm trying to implement google type of searches using Oracle Text but I
could not figure out an easy way of doing it. I could not find an relevant
information in the documentation.
When a user enter a search string, I would like Oracle Text to return all matching rows first followed by rows that matches one or more of the search tokens.
The only way I can think of is seraching the exact string using the contains clause and then seach each individual token.
for example, if the search string is "Oracle Text", I would execute the following queries to retrieve the relevant records:
select * from texttable where contains (text, 'Oracle Text')>1; select * from texttable where contains (text, 'Oracle')>1; select * from texttable where contains (text, 'Text')>1;
This is tedious and worst yet, I have to filter out duplicate records return by the queries. Also, if the number of tokens in the search string is long, the number of queries I have to run increases. The filtering will also get extremely complicated.
I'm sure Oracle Text can provide the same results using a much easier approach. How can I do that in Oracle Text?
Thanks for any help you can provide.
Ivan
![]() |
![]() |