I've written a simple search engine with SQL. It works fine when I search on a single term like "test". It does not work when I use more than one term like "run test". Any ides where I should start looking for a fix?
How are you doing the search? What would the where clauses look like in the SQL statments bewteen the one which works and the one which doesn't? Are you using full-text search?
and what would be the two term search item? Do you want to search for "run", "test", "run test" or just "run test"?
I would consider using fulltext search as a search with like and then a wildcard in the first term automatically means that indexes cannot be used. This means the search will become extremely slow as more records are added.
I have a asp page that contains a search box. Single word searches work fine. However what i would like to have is the facility to type multiple words into the search box and only have records returned that contain all words entered. I know that I could do this by typing AND into the search box, however this is not very user friendly. Is there any way that I can script the SQL statement to search for all words in the search string, or do I have to do some scripting to add AND where there is a space and then pass that as the search string.
Thanks
Greg Palmer
Freeware Utilities for Windows Administrators.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.