lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: Highlighting Redux
Date Sun, 23 Mar 2003 21:04:49 GMT
Leander Harding wrote:
> Consider the following query:
> ("foo" AND "bar") OR "baz"
> Suppose that we search using this query and the following document is a hit:
> <doc>Foo.....quux......baz.</doc>
> Which Terms do we highlight?
> All of the existing highlighting code I've seen would highlight both "foo"
> and "baz", but this isn't correct - the document contains "foo", but no
> "bar", thus, since "foo" in the query is part of an AND expression that
> wasn't satisfied by this document, only "baz" should be highlighted.
> So my questions three, are thus:
>     What's the best way to go about this?
>     Has anyone been working on anything similar?
>     Is there already API to make this possible that I'm overlooking?

Another question to ask is: does it really matter?  The user has 
expressed an interest in "foo".  Does highlighting "foo" offend or even 
distract the user?  I doubt it.  I think most would find it useful or 
not care.  Perhaps you can come up with a more compelling example using 
real words, but my suspicion is that the rewards for implementing this 
sort of correctness are few and not worth the effort.

Doug


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


Mime
View raw message