Skip to main content.
home | support | download

Back to List Archive

Re: WMI, Swish-E, and Incremental Indexing

From: Bill Moseley <moseley(at)>
Date: Fri Jan 09 2004 - 19:23:25 GMT
On Fri, Jan 09, 2004 at 08:12:20AM -0800, Deane Barker wrote:
> Here's a theory.  I'm not actually doing this, but I stumbled onto
> WMI, and so this line of thought followed:
> Using the Windows Management Instrumentation, you can capture file
> events from NTFS.  You can effectively run a script whenever a file is
> added to a directory, deleted from a directory, or modified in a
> directory.  Here's an example:
> Using this, couldn't you finagle incremental indexing with Swish-E?
> Since you can run a script when a file is added, could that script
> index just that one file to a separate index, then merge that index
> with the main index?
> Wouldn't this give you roughly the same effect as, say Microsoft
> Indexing Service whereby new files suddenly appear in the index after
> just a few minutes?

Kind of.  Depends on the size of the index.  For one thing, you would have
to protect against running more than one indexing job at the same time.
So you might want to set a flag when a file was modified/added and then
use cron to run every few minutes to do the indexing.

Merge is not incremental indexing, though.  All merge does is combine
two indexes.  It does save the time of parsing the documents, but that's
somewhat offset by the extra work merge needs to do.  Also, merge
doesn't delete documents, although you could probably replace an
existing document with one that has no words.

Bill Moseley
Received on Fri Jan 9 19:23:35 2004