Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL and search engines
First if you search with like you should use '%Author%' to make it search for author as a substring in that field.
Then create an index on the two fields and search them something like this. You DO know how to do this I suppose.
select * from search_table
where (free_text like '%&&input%'
or free_text2 like '%&&input%');
Bryan J. Gentile <bgentile_at_bdsinc.com> wrote in article
<344B9C98.FD9707F8_at_bdsinc.com>...
> I am trying to build a search engine. I want to search on two fields in
> my database.
>
> I have an interface where the user inputs the search keyword. I then
> want to see if the keyword that the user entered matches any of the
> words in two different fields in my table in the database. What is the
> best way to do this. I want to search for any instances of the keyword
> in UpperCase, LowerCase, and how it was typed in. I also don't want it
> to only search for an exact match of that word, for example, if the user
> typed in 'Authors', and a field in the database contained the word
> 'Author', I would want the search to pick this up. If I just did
> "select message_id from message where message_subject LIKE 'Authors'",
> then it would not pick it up.
Received on Tue Oct 21 1997 - 00:00:00 CDT