Monday, 7 May 2012

Real Time Search Results with SP Change Log

Search results are only as up to date as the index.

In most cases this small limitation is not an issue. No one really cares that there posted document or blog post will not show up in search results until the next crawl.

From a performance point of view this is a very small price to pay, compared to looping through the entire site with the SharePoint API to find the handful of documents that may not be in the index.
But what if the majority of your screens are search drive? What if the people using the site needed to see the documents the minute they are posted?

Earlier in the year we ran into that exact problem on one of our projects. Many users found it confusing when they would post a new item, but it would take at least 5 minutes before their item would show up on any screens. 

Very unintuitive. How do you know everything went well?

To solve this issue we looked into the SharePoint Change Log. The SharePoint Change Log was created to be able to target which items need to be added to the index. In SharePoint 2003, every incremental crawl needed almost a full crawl just to see what had changed. In MOSS and higher every change is recorded in the Change Log, the crawl then uses this log to add/remove items from the index.

As you can imagine this is a very powerful tool. We can use the Search results to get the vast majority of results, then using the Change Log we target exactly what items need to be add/removed from our screens.
Just like that, Real Time Search Results from SharePoint.

No comments:

Post a Comment