[Xapian-discuss] locate and omega: how to index file names?

Olly Betts olly at survex.com
Tue May 6 10:53:46 BST 2008

On Mon, May 05, 2008 at 12:44:18PM +0200, tindal wrote:
> I'm indexing a filesystem using omindex, and users can query the 
> database via omega: everything works fine
> now I'd like to add an option like "search files by name" and I'm 
> wondering how to do this
> can omega search files by name directly? how should I build the query?

Not if you index with omindex, since it doesn't index the full path of
files in any way.

> could I use scriptindex to index, eg., the locate database? how?

If you're able to dump the locate database's contents, just write a
script in your favourite scripting language to convert that to
scriptindex's input format.

> should I index file names directly?
> can omindex do this or should I use scriptindex? how?

Directly?  You can certainly index the filenames as you index the files
but you'd have to modify omindex to do this, or recurse the directory
tree dumping it into scriptindex's input format.  Or write your own
indexer from scratch.


More information about the Xapian-discuss mailing list