lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markharw00d <>
Subject Re: Highlighter using spans
Date Sun, 13 Nov 2005 10:38:51 GMT
Hi Erik,
I posted what I thought would be the best approach to fixing this here 
along with pointers to some existing code:

Unfortunately I've been way too caught up in other work lately to 
implement this and this particular "itch" hasn't been high on my list of 
things for me to scratch.

 >>and hope to be able to merge this back into Highlighter  in some way 
in the future.

The current highlighter has some stuff that may be generally useful but 
the fragmenting code would certainly have to change to avoid breaking 
span "runs".

I see there was some discussion recently about "queries as filters" for 
non relevance-ranked criteria eg RangeQueries which seems to make sense. 
Once rewritten as filters these sets of criteria will not be as easily 
reverse-engineered to a set of terms for use in highlighting. I suspect 
most people won't want to highlight these non relevance-ranked terms 
anyway so they can probably be ignored for highlighting purposes?


Erik Hatcher wrote:

> 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:
> For additional commands, e-mail:

Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail

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

View raw message