none
Creating keyword search over FAST search managed property RRS feed

  • Question

  • Hi All,

    In my list I have a YES/NO Column say e.g. isFlag. I need to write a code which search for specific keyword entered by user in search textbox within anywhere list items which have isFlag= YES using FAST Search. For that I have created a managed property for isFlag column which name is managedIsFlag. I am using KeyWordQuery class for search. My code is something like this...

        

    KeywordQuery query = new KeywordQuery(ssap)

    query.QueryText = txtSearchKeyWord.Text + " managedIsFlag:true ";
    query.ResultTypes = ResultType.RelevantResults;
    query.ResultsProvider = SearchProvider.FASTSearch;
    query.EnableFQL = true;

    When I execute above code it throws error saying "malformed query" meaning QueryText is incorrect. But if I search using same syntax in my FAST search center site I am getting correct results. E.g. If I enter in search box " KeyWord managedIsFlag:true", it returns all the list items which contains "KeyWord" anywhere in items and also has isFlag=Yes. So my question is what should be the syntax for QueryText in my code?  

    If I change QueryText value in my code to  query.QueryText = "managedIsFlag:true " then I am getting all list items which has isFlag="Yes" which is correct.

     Thanks a lot in advance!


    Hitesh

    Friday, May 31, 2013 4:09 PM

Answers

All replies