lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Haye>
Subject Re: Highlighter using spans
Date Mon, 14 Nov 2005 16:40:38 GMT
I might mention that, if you're converting your query to spans anyway, you
could avoid running it twice (once over the document set, another time for
highlighting) by using it as a main query and recording the spans as you go
along. I'm not sure this is better, but it's what XTF uses.


On 11/13/05, Erik Hatcher <> wrote:
> On 13 Nov 2005, at 16:34, Jason Calabrese wrote:
> > Adding Span and Phrase support tot the highlighter is something
> > that we've
> > been needing in my project for a while.
> >
> > Would adding support for spans also add support for phrases?
> The idea is to modify Highlighter to utilize the SpanQuery
> capability, via getSpans(), to produce the regions that match. This
> requires that all queries, except BooleanQuery, be converted to an
> equivalent SpanQuery. It's pretty simple to convert a PhraseQuery to
> a SpanQuery, and Mark's SpanExtractor does this very thing. (note
> that a PhraseQuery and SpanNearQuery have some edge cases where they
> are not entirely equivalent, when slop is involved). So yes, if the
> Highlighter supports SpanQuery's, it would be possible to highlight
> phrases accurately.
> Erik
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message