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?
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?