Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to create something like "Recent blogs" after some research I came up with two feasible options.

  1. Use Search Core Results - has been suggested that it is possible to create some sort of query to scan through people blogs.
  2. Keep a separate list just with recent blogs - would require event to add new recent blogs and remove old ones - just so that I keep recent 10.
  3. Create custom webpart which scans though everyone's mysite, collects all blogs and then shows only 10 most recent --- Bad bad idea.

I have decided to try option 1 (I tried option 3. already and ended up timing out the server.. sigh...). I have never used search core results so I have no idea where to start.

Is it even possible to use search core results? How complex is it? Can anyone give me some pointers?

share|improve this question
    
I have the webpart which will brings up recent blog, wiki and discussion. send me your email id and i will send it to you. –  user994521 Jul 6 '12 at 6:06
add comment

2 Answers 2

up vote 2 down vote accepted

Using Search Core Results web part is definitely the best approach out of the 3 options you mentioned and it's easier than you might think:

  1. Add the Search Core Results to the page (may need to activate the Search Server Web Parts site collection feature to enable make the web part available)
  2. Set the Location web part property to Local Search Results if using SharePoint Search or Local FAST Search Results if using FAST Search
  3. Set the Fixed Keyword Query web part property to contenttype:post
  4. [Optional] Uncheck the Use Location Visualization checkbox and use the XSL Editor web part property to customize the results appearance
  5. [Optional] Use the Results Per Page web part property to control the number of search results displayed - defaults to 10

The only piece that the out-of-the-box Search Core Results web part doesn't allow you to do is set the sort order. The default ranking model will make blog posts most recently added to the search index show up at the top which may be sufficient for your purposes as incremental content crawls index new blog posts.

If you are using FAST Search and need to have more control over the sort order then you can develop a custom solution. First, create a new managed property and map it to the ows_publisheddate crawled property. Then, build a custom web part and use the KeywordQuery class to query the search index.

share|improve this answer
    
worked very well thanks! –  Luke Jul 6 '12 at 22:32
add comment

You can use Search Core Results with a set query.

I would set it to look for

"contentclass:STS_listitem_blog" to show the blog posts

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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