Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> How to build a search engine
Hi all:
I have a question on how to build a smart search engine.
I need to store a user entered query phrase from a form into a variable. Then I can pass this variable into another form to excute the query from a database table. The system should bring up a record if the words appeared, not key letters.
For example, if we put EVOLUTION in, the computer should not pull up hit words that have the word EVOLUTION in it such as REVOLUTION or COUNTERREVOLUTION, or If we use DAY CARE, "Billy HoliDAY:CAREer" should not be qualified for the selection.
I solved a part of the problem by using REPLACE function:
NewVar:=REPLACE(:query_phrase,' ','% ')||'%'; This will rebuild a phrase like "EVOLUTION PROCESS" into "EVOLUTION% PROCESS". Any word like EVOLUTIONARY will be fine.
But how do we deal with the first word in the query_phrase?
Any help will be appreciated.
Thanks in Advance.
Tracy Wang
Programmer Analyst
System Computer Technology (SCT)
Received on Tue Feb 13 1996 - 15:25:02 CST