5

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?

  • 1
    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
2

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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