[Xapian-discuss] Patches

Olly Betts olly at survex.com
Thu Aug 21 14:22:05 BST 2008


On Wed, Aug 20, 2008 at 10:49:37AM +0930, Frank Bruzzaniti wrote:
> I was thinking about using some of the inotify userland  tools 
> inotify-tools to script something.
> 
> E.g. I've come across some examples where people use inotify to envoke 
> clam avtivirus for example to scan a file when it's changed or added.
> 
> My question is do you think this is an acceptable path to take?

It seems worth investigating, though if a lot of files are changing in a
short length of time it might struggle to keep up if you only reindex
them individually rather than in batches.

An alternative would be to have a "keep scanning" mode for omindex where
it uses inotify or similar to monitor indexed files/directories for
changes.

Also, how portable is inotify-tools?  It seems inotify is Linux-specific
and requires Linux >= 2.6.13.  So if inotify-tools is inotify-specific,
it might be better to use a library which wraps similar features
available on other platforms.

> Is there a way to envoke omindex to scan a single file from the command 
> line?

No, but it wouldn't be hard to add that.

Cheers,
    Olly



More information about the Xapian-discuss mailing list