[Xapian-discuss] About Resume

Jim jim at fayettedigital.com
Wed Nov 7 17:06:31 GMT 2007


Aleph Thomas wrote:
> I need know if I can make resume of the document, and how, but I need
> that in the resume appear the words that I am find. An need know too
> if this can be do using omega.
>
>   thanks
>
> _
I'm going to guess that by "resume" you mean a sample of the document 
similar to what Google presents.  If that is true, then omega does not 
have the ability to extract sample data from the original source and 
highlight the search terms.

I have implemented this in a perl script.  The method I used was to call 
omega using the FMT=xml option and parse the returned xml document.  In 
the data I indexed is a field that points to the original file from 
which I indexed. For each "hit" I extract that file name, read the file 
and generate a sample with phrases containing the search terms.  I 
arbitrarily truncate the data without thought to trying to rate the 
phrases as to their relevance.

Hope that helps you get started.

Jim.



More information about the Xapian-discuss mailing list