[Xapian-discuss] Indexing filenames

Frank J Bruzzaniti frank.bruzzaniti at gmail.com
Tue Feb 10 15:17:53 GMT 2009


I would like to be able to add the filename without the url to the 
search results and be able to search via the filename in the searches.

James Aylett wrote:
> 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
>
>   



More information about the Xapian-discuss mailing list