lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Highlighter using spans
Date Sun, 13 Nov 2005 01:51:44 GMT
Mark et al,

I'm delving into highlighting text (per-field, like the recent topic  
on java-user) and need it to highlight the exact spots used in the  
query, not just all query terms as the current Highlighter does.  And  
I need it to be SpanQuery savvy.  Further, it seems the Spans  
capability is the best way to accomplish this.

At this point I don't need fragmenting - the requirement is  
highlighting the full text on a per-field basis.

Using Spans requires an IndexReader.  And because, of course, I'm  
only highlighting a single document at a time, the document id is  
needed to narrow down the Spans iteration.

This is about as far as I've gotten thus far.  I'm implementing this  
from scratch rather than trying to start with the current  
Highlighter, and hope to be able to merge this back into Highlighter  
in some way in the future.

I'm sending this to the list to solicit comments and suggestions on  
this approach.  Thoughts?

Thanks,
     Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message