News Webpart RRS feed

  • Question

  • Hello.

    I have made a webpart which is collecting news from all SharePoint subwebs using FAST Search for SharePoint 2010. The webpart is based on KeywordQuery and displays only two parameters of news: Title and Creation Date(Write) because I have these parameters in the result of KeyWordQuery execution.

    The questions are:

    1)How can I extend result set of Keyword query with new columns? I tried to create managed properties, but KeywordQuery didn't return this new columns. As far as I know there is managed property attribute called Retrievable at SP Enterprise Search for this purpose. But fast search managed properties don't have this attribute. Why?

    2)What is the best way for displaying more news attributes in the webpart? If I just create new managed properties and set them to be retrievable in Keyword query, then after creating 10 similar webparts KeywordQuery would return a very huge amount of properties. Is it goog practise?

    Thank you in advance.

    Ivan Gorbadei. Sharepoint 2010 MCPD & MCITP.

    Monday, October 1, 2012 4:19 PM


  • 1) Use the KeywordQuery.SelectProperties Property to request the new managed properties to be returned by the query.

    2) The best practice would be to only request the managed properties you need to display on your web part by using the SelectProperties KeywordQuery object property mentioned above.

    • Marked as answer by Ivan Gorbadei Friday, October 5, 2012 4:28 AM
    Friday, October 5, 2012 2:58 AM

All replies