With the Persistent Query Service removed in the Search feature in SharePoint Server 2007, a common question that I receive is this: how are notifications generated for alerts? This post will answer this question.
First, however, I want to ensure that we use our terms wisely. “Alerts” are the rules that users define in the browser to tell the system when they should be notified about new or modified content. “Notifications” are the emails and RSS feeds that are generated to inform the user when the new or modified content becomes available. Users set alerts. But they receive notifications. OK, now that we have our terminology correct, let's move on to how notifications are generated.
First, everytime a document is crawled, a timestamp is applied to that document in the SQL database. This timestamp represents the last time a document was seen in a crawl as having been modified. Then, a timer job is fired that processes the alerts table. Included in the alerts table is information on the last time a notification was sent to the user. Thirdly, each query is executed and for all the results that are returned, the query filters the documents where the last modified date/time is more recent than the last alerted time. For those documents with a more recent modified time stamp, a notification is generated and sent to the user.
A full crawl process will re-crawl all documents, but the column for last modified times for notifications is only updated if the document is different than the previously crawled copy. The timestamps for notifications are still retained during a full crawl, so the user doesn't receive false positive notifications.
A index reset will clear all knowledge from the system, so when the content is re-crawled after an index re-set, users will receive notifications that they might have received before.
Bill English
Mindsharp