Re: Reindex needed?



Hi,

Brian J. Murrell wrote:
On Wed, 2006-07-12 at 18:01 -0400, Joe Shaw wrote:
It's not necessary, although it will speed things up quite a bit.  You
can delete your old index by deleting the
~/.beagle/Indexes/FileSystemIndex directory.  When you restart beagled,
it'll start reindexing your files.

Hrm.  What triggers a file's "re-index"ing?  Like if it's contents have
changed, obviously, but how does beagle determine this?

Well, in the example I cited above, you are deleting your index, so Beagle recognizes this and reindexes the world.

Generally speaking, however, Beagle uses xattrs (or a sqlite database) to store the last time it indexed a file. If it recrawls later (either because the daemon was restarted or because inotify isn't enabled) it checks to see if the modification time on the file is newer than the last index time and, if it is, reindexes.

I don't know what goes in the EAs, or even what files the EAs are
attatched to (must be the actual files being indexed -- there would not
really need to be EAs otherwise I'd figure), but I guess for this type
of scenario (which happened to me too!  Ran with EAs not enabled for a
while) it would be nice if beagle noticed that it is able to create EAs
where it was not when the file was last indexed and just do it.

You can run "getfattr -d" on a file to see all of its xattrs, including the ones that Beagle has set. Beagle *could* migrate the attributes stored in the sqlite database into xattrs when it crawls over them and notices that it now can, but it's a corner case that just doesn't seem worth the effort, honestly.

Joe



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]