Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Handling "no results" exception using QueryEx and only noise words

  Asked By: Payal    Date: Jan 07    Category: Sharepoint    Views: 826

We are writing an ASP.NET application that's using the Search QueryEx
web service for SharePoint. We submit strings and get result sets
back with no issues. The call to QueryEx looks like this:

ds = Search.QueryEx(queryString)

However, when a query is submitted with only "noise" words (like "a"
and "the"), we get an "internal server error" returned. We are able
to catch the error and display "no results" to the user, but our
question is: How can we tell the difference between a fatal error and
no results?

The SharePoint front-end search seems to handle it fine. We've looked
at the Search.aspx code and can't figure how SharePoint handles it.

Note: SearchPoint does not index noise words, so quering for "the"
will always return no results.

We also tried this with the Query function which returns XML instead
of a DataSet, and it does return "the query contained only noise
words - no results" in the XML string: It doesn't raise an exception
like QueryEx does.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 




Tagged: