[Xapian-discuss] Indexing filenames
James Aylett
james-xapian at tartarus.org
Tue Feb 10 13:10:05 GMT 2009
On Tue, Feb 10, 2009 at 09:48:48PM +1030, Frank J Bruzzaniti wrote:
> > omindex doesn't, but it wouldn't be a terribly difficult thing to add
> > to it.
>
> I'm not sure where to start, could you suggest how or what i need to alter?
omindex.cc around line 500 does the indexing. Something like:
----------------------------------------------------------------------
indexer.increase_termpos(100);
indexer.index_text(<filename>);
----------------------------------------------------------------------
would do the trick. You may want to add a prefix, and what <filename>
is (on-disk filename or the URI) will depend on what you're trying to
achieve. But that's where to add the code, and the methods to use.
J
--
James Aylett
talktorex.co.uk - xapian.org - uncertaintydivision.org
More information about the Xapian-discuss
mailing list