[Xapian-discuss] Feature requests

Olly Betts olly at survex.com
Wed Feb 21 10:28:47 GMT 2007


On Wed, Feb 21, 2007 at 09:47:42AM +0000, Bill Crawford wrote:
> This would be MOST useful where a query has been entered e.g. as part
> of a CGI form, and could contain phrases, filters, etc., since
> currently one has to basically duplicate the work of parse_query to
> figure out what terms to highlight in results.

Xapian::Query::get_terms_begin() and
Xapian::Enquire::get_matching_terms_begin() help a lot here.

> Some way to get the information back as part of the results would be
> great (in particular, for a phrase match, only some of the relevant
> occurrences of a term should be highlighted, ...).

You actually want to rerun the indexing time parsing on the text to be
highlighted, rather than the QueryParser parsing.  Omega contains much
of the code required, though it doesn't highlight phrase matches as
phrases currently.

I was hoping to move this code to the core library for 1.0, though I'm
not sure I'd want to delay 1.0 if this is the only thing left to do.

> Anyway, a "me too" for some kind of feedback of the matched terms plus 
> positions :) was looking for something similar here.

As always, you're welcome to file "wishlist" bugs in the bug tracker.

Cheers,
    Olly



More information about the Xapian-discuss mailing list