I have an asp.net web page used to search for company names in our database using FTS. They enter the company name in a search box and submit.
First I trim any leading or trailing spaces, then i replace each internal space with " NEAR ".
So a search for:
"The Association of Lefthanded Picklepickers"
Is fed as:
"The NEAR Association NEAR of NEAR Lefthanded NEAR Picklepickers"
Into the following WHERE clause used by the search results grid:
WHERE CONTAINS(CompanyName, @Search)
This method works perfectly until a noise word (the, is, and, to, etc.) is part of users search. When this happens the SQL server returns no search results. In the case of the above search, the word "of" breaks the search even if a company with the exact title exists in the database.
What should I do to overcome this problem?
Your thoughts and advice are greatly appreciated!