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 Answer 1

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.

1
  • 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(); Commented Feb 24, 2011 at 14:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.