SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking into a solution for a querry web part(?) The web part should display the 10 last updated documents (or less), in the last 2 weeks for all the document libraries in a specific web application for which the currently logged in user has access (Security trimmed results) (+/- 150 doc libs)

In order to achieve the security trimmed results I suppose a combination with the search service should be applied.

What would be the best approach or best practices to develop this? (Maybe SP2010 has some standard web parts / features to achieve this?)

Thanks in advance!

share|improve this question
up vote 1 down vote accepted

Yes, using the search service is going to be the most efficient way for a cross site collection query.

Use the SQL syntax:

With the order by as modified desc, and just grab the first ten records using row limit on the query object

Set your incremental crawl to be semi fast (under an hour)

Pass those search results into your web part, and display either using xslt or build a control tree.

share|improve this answer
Thanks Djeeg, I don't know if you can help with some examples? On how to format the data I get back from FullTextSqlQuery sqlQuery = new FullTextSqlQuery(SPContext.Current.Site); ResultTableCollection resultTables = sqlQuery.Execute(); – Wim Hill Feb 24 '11 at 14:15

Your Answer


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.