0

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!

1

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

Use the SQL syntax:

http://msdn.microsoft.com/en-us/library/ms497585.aspx

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.

| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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