Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Full Text Search . . noise words

Status
Not open for further replies.

MikeMCSD

MIS
Jul 12, 2002
107
US
I'm passing a string into this stored procedure for
a Search using Full Text Search:

CREATE PROCEDURE SearchCatalog
(@Words varchar(50) = NULL)
AS
SELECT ProductID, Name, description
FROM Product
WHERE FREETEXT(*, @Words)

If the string just contains "the", or "4", or
other "noise words" an error is returned to my
VB ASP.NET program that says:
"A clause of the query contained only ignored words."

But if the string contains 2 words like "the medals",
it works, performing a search on "medals".

How can I handle this without filtering every phrase for
"the", etc . .
This one has me puzzled.




 
in your query add some error handling. Then use the like operator to return results in the case that a query does only contain ignored words. That is the quickest way to get around this.

There are more complex ways, but then you get into the realms of building fully fledged search engines.
 
This is so stupid! How could Microsoft do this?

Right now I got it so I just pass words more than
two characters. But I still have a problem if I just
type "the", it crashes.

I'll have to see if I can play with the noise word file
and remove words, or check for them in code.

[curse]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top