lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: multi-field highlighting
Date Tue, 10 May 2005 19:24:11 GMT
markharw00d wrote:
> Before we leap into adding code into the highlighter though I think it's 
> worth considering what we are trying to fix here in a more general sense.
> As a basic principle I think highlighting should attempt to show the 
> user what the search engine saw as important in the document.
> With that principle in mind I should really make sure that if I search for:
> ("Doug Cutting" AND lucene) OR google
> 
> I shouldn't highlight  "Doug Cutting" in a matching document that has 
> google but not lucene.

Shouldn't the search code already take care of that?  That said, for a 
document that contains both "Doug Cutting loves Lucene" and "Doug 
Cutting loves Google", ideally a highlighter should prefer "Doug Cutting 
loves Google".  The query should thus be compared to each potential 
highlight fragment.  This evaluation is different than the 
whole-document evaluation performed by search.  If no fragments match 
the entire query, then fragments should be selected which, considered 
together, match the entire query.

Doug


---------------------------------------------------------------------
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