SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically I would like to get all results that would be returned for a normal keyword query, but I want to filter those results with a WHERE clause. I tried using KeywordQuery or FullTextSqlQuery but didn't see anything in either that would appear to let me do that.

Can someone point me in the right direction?

share|improve this question
I'd suggest that you just use the KeywordQuery, if you ever want to upgrade to FAST then FullTextSqlQuery insn't suppoerted. what kind of WHERE can't you express using KeywordQuery? – Per Jakobsen May 25 '12 at 22:46

Looks like you can pass in a keyword along with some parameters to filter the results. Example:

KeywordQuery kw = new KeywordQuery();
kw.QueryText = "some keyword (DocumentDate >= 1/1/2009 AND DocumentDate <= 12/31/2009)";

will return only results that would be returned for a search on "some keyword" that have a DocumentDate somewhere in 2009.

You can find the details here.

Hope this helps someone!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.