Skip to main content.
home | support | download

Back to List Archive

Re: Select files for incremental indexing

From: Dmitri V. Ivanov <dima(at)>
Date: Mon Oct 09 2006 - 18:37:54 GMT
I'm an idiot!!! Where was my eyes?

Date: Mon, 9 Oct 2006 10:51:08 -0700
From: Bill Moseley <>
To: "Dmitri V. Ivanov" <>
Subject: Re: Select files for incremental indexing

On Mon, Oct 09, 2006 at 10:25:56AM -0700, Dmitri V. Ivanov wrote:
> Yes. I mean that ctime isn't sufficient measure. But to get it we anyway
> call stat() and data it provides is sufficient. But we must remember
> name and inode number pairs for all directories and monitor it's
> changes. Problem is only to sync our remembered data and order of files
> and directories we read. I've used sorting for it.

Yes, using mtime is not right -- checking other changes to stat()
might be better.  Of course, we are interested if *content* changes so
a file's mtime, ctime, inode can all change but the contents could
still be exactly the same.

The -N switch checking mtime is fine for the common case where someone
might update a file in place with new contents.  swish-e -h shows:

    -N : index only files with a modification date newer than path supplied

Using -S prog might be more appropriate way to deal with more complex
situations.  That's what it's for.

Bill Moseley

Dmitri Ivanov
Received on Mon Oct 9 11:38:00 2006