1

We are working with Fast Search for Sharepoint 2010 and had some backend setup done with creating some managed properties e.g. BestBetDescription, keywords etc.

From the front-end part we are creating an application what will fetch all these properties and display in a grid.

However while querying the backend we are NOT getting these managed properties (BestBetDescription) along with other properties such as Title, URL etc.

Following is my source code:

settingsProxy = SPFarm.Local.ServiceProxies.GetValue<SearchQueryAndSiteSettingsServiceProxy>();
searchProxy = settingsProxy.ApplicationProxies.GetValue<SearchServiceApplicationProxy>("FAST Query SSA");
keywordQuery = new KeywordQuery(searchProxy);
keywordQuery.EnableFQL = true;
keywordQuery.QueryText = p;
keywordQuery.ResultsProvider = SearchProvider.FASTSearch;
keywordQuery.ResultTypes = ResultType.RelevantResults;
ResultTableCollection resultsTableCollection = keywordQuery.Execute();
ResultTable searchResultsTable = resultsTableCollection[ResultType.RelevantResults];
DataTable resultsDataTable = new DataTable();
resultsDataTable.TableName = "Results";
resultsDataTable.Load(searchResultsTable, LoadOption.OverwriteChanges);
return resultsDataTable;

The results are returned and I cannot see the Managed properties which we create in the resultDataTable.

Is there any property I missed or is this a backend issue ?

Thanks.

Amin Sayed
  • 1,240
  • 2
  • 13
  • 26

2 Answers2

2

Hi if you are creating your custom Metadata Property then u should use this option to be selected

please check below link

http://screencast.com/t/SQdlarjhx4F

You can find this option in : central admin:- services :- fast search :- Metadata Property :- your property

V_B
  • 1,571
  • 5
  • 16
  • 37
  • Thanks V_B. Actually i missed one property keywordQuery.SelectProperties([array of properties to be fetched]). I also take this option. Thanks for the answer. – Amin Sayed Apr 05 '12 at 14:17
1

I was missing a property KeywordQuery.SelectProperties

So the code looks something like this

String[] arrSearchProperties = new String[] { "Title", "body", "url" };
KeywordQuery.SelectProperties(arrSearchProperties);

This will fetch you all the Managed Properties defined by you.

Amin Sayed
  • 1,240
  • 2
  • 13
  • 26