lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Highlighting span for Phrase Queries
Date Tue, 14 Nov 2006 10:01:31 GMT

On Nov 14, 2006, at 4:08 AM, Heikki Doeleman wrote:
> thanks for pointing out these, however neither seems to do exactly  
> what I
> want, i.e. highlight a phrase when a phrase search was done.

A technique I've employed for a client is to convert a general Query  
object into a SpanQuery, and created custom code to walk the spans,  
via SpanQuery.getSpans(), to put markers around them (such as <span  

At this point the code is not public domain, though it is not  
particularly sophisticated either.  There may be some examples that  
have floated past this list in the past of SpanQuery highlighting?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message