none
Access Visual Best Bets results programmatically in FAST search RRS feed

  • Question

  • Hello,

    I am working in FAST Search environment and want to retrieve Visual Best bets results programmatically.

    I wrote following code, but it is not returning any results. 

     SearchQueryAndSiteSettingsServiceProxy settingsProxy = SPFarm.Local.ServiceProxies.GetValue<SearchQueryAndSiteSettingsServiceProxy>();

     SearchServiceApplicationProxy searchProxy = settingsProxy.ApplicationProxies.GetValue<SearchServiceApplicationProxy>("FAST Query SSA");

     KeywordQuery keywordQuery = new KeywordQuery(searchProxy);

     keywordQuery.EnableFQL = true;

     keywordQuery.QueryText = "deployment";

     keywordQuery.ResultsProvider = SearchProvider.FASTSearch;

     keywordQuery.ResultTypes = ResultType.VisualBestBetsResults;

     ResultTableCollection resultsTableCollection = keywordQuery.Execute();

     ResultTable searchResultsTable = resultsTableCollection[ResultType.VisualBestBetsResults];

     DataTable resultsDataTable = new DataTable();

     resultsDataTable.TableName = "Results";

     resultsDataTable.Load(searchResultsTable, LoadOption.OverwriteChanges);

     gridViewFQL.DataSource = resultsDataTable;
     
     gridViewFQL.DataBind();
     
    For ResulType = RelevantResults it is returning proper results.

    Can anyone help me to identify what is wrong in the above code

    Thanks

    Monday, October 17, 2011 3:08 PM

Answers

All replies