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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"ignored words" for a full text search

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Morning all --

My problems with the full text search continue --

I have a fairly good grasp on what and how the search needs to be structured, but I keep having a problem with "ignored words" --

For example, if I type in "check and in" to my search box, I get an error stating that the query only contained ignored words. Well, this being a travel industry related database... the words, check in, are fairly important -- and therefore shouldn't be ignored.

I am playing with the FREETEXT keyword -- and checking to see if the query contains boolean operators such as AND or OR -- and plugging those into a query with the CONTAINS keyword --

Here is the algorithm that I'm using to parse the string and decide what to do with it to build my query --

Code:
sub setSQL(sqlString)
	dim contains, searchString
	contains = false
	splitArray = split(Request.Form("searchString"))
	for i = 0 to ubound(splitArray)
		if ucase(splitArray(i)) = "AND" or ucase(splitArray(i)) = "OR" then
			contains = true
		end if
	next
	if not contains then
		sqlString = "SELECT voc.* FROM voc WHERE FREETEXT (verbatims, '" & Request.Form("searchString") & "')"
	else
		for i = 0 to ubound(splitArray)
			if ucase(splitArray(i)) = "AND" or ucase(splitArray(i)) = "OR" then
				searchString = searchString & " " & splitArray(i) & " "
			else
				searchString = searchString & """" & splitArray(i) & """"
			end if
		next
		sqlString = "SELECT voc.* FROM voc WHERE CONTAINS (verbatims, '" & searchString & "')"
	end if
	Response.Write(sqlString)
end sub

Hmmmmm... if anyone has encountered these problems before, and solved it, or at least knows where I can find a list of these "ignored words" so I can jerry rig a workaround (last resort, please), then I sure would appreciate it.

and ps... I will write a FAQ on this subject so that we can all use it once I feel certain that I have a good handle on the subject matter -- I'll try to make it as extensive as possible.

Thanks for any input! :)
Paul Prewett
 
There is a file called [tt]noise.enu[/tt] (language specific; this is for US-English). It is a text file that can be edited - you can add and delete words. Do a file search to find it; mine appeared in a different directory than the BOL mentioned.

"Check" was not in there, but "in" was. Robert Bradley
teaser.jpg

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top