Posts Tagged ‘KeywordQuery’

RowLimit in FAST KeywordQuery

Friday, December 16th, 2011 in SharePoint 2010.
Tags: , , , ,

No Comments »

Sometimes when you are using a KeywordQuery object to perform a search and your Search Service Application is FAST Search Server for SharePoint you can see this message instead of your result:
“The search request was unable to execute on FAST Search Server.”
In my case I tried to set KeywordQuery.RowLimit property to get more results and my query had been looking like this: or ((lastname:”jonh*”),(firstname:”jonh*”))
I this case it failed to execute the query. But when I use “starts-with” instead of * symbol everything works perfectly. So I just rewrote my query to be like this:
or ((lastname:starts-with(“jonh”)),(firstname: starts-with(“jonh”)))
And it works perfect.

If you still have an error when you try to execute a query try to set your RowLimit to 100 or 200. I found out that in some cases if there are too many results for the query FAST will stop the execution with error. Try to set minimal row limit and check again.

I hope it will help somebody.