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

Noise words problem

Status
Not open for further replies.

bereza

Technical User
Jun 14, 2006
105
EU
Hi,

I am trying to customize SPS's search, it goes well with a little problem,
My web part finds the documents that contains a specific word,

But if my Search phrase is a noise word (for example "one", "and", "is", "there",......etc) it generates an exception.

I tryed solve my problem by placeing all noise words in an array and check if my search phrase is not one of the noise words, like this:

for(i=0; i<MyArray.Length; i++)
if(MyTextBox.Text == MyArray.ToString())
{
i = MyArray.Length;
IsNoiseWord = true;
}

if(IsNoiseWord == False)
{
....searching for document by using QueryProvider and CONTAINS
}

assume that one of my documents contains "Hi Honey, There is a test" and you searching for "There is"

it generate same Exception again, WHY?
"There is" is not a noise word, both "there" and "is" are noise words but "there is" is not a noise word.

but you search for "There is a test" , everything goes well and finds the document

I am confused, please help me , how must i solve it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top