lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Goddard (JIRA)" <>
Subject [jira] Commented: (LUCENE-794) Extend contrib Highlighter to properly support PhraseQuery, SpanQuery, ConstantScoreRangeQuery
Date Thu, 21 Feb 2008 01:21:43 GMT


Michael Goddard commented on LUCENE-794:

I'm fairly certain that Mark H.'s comments are correct, but somehow I was getting highlighting.
 ConstantScoreRangeQuery was the query I'd used initially, but I had to later introduce a
SpanRangeQuery which I could embed in SpanNearQuery instances.  And, yes, we have users who
need this perverse combination.  They have a query syntax which is very expressive and enables
them to nest "proximity" (SpanNearQuery) queries to an arbitrary depth; they can even embed
numeric range queries within any of these sub-queries.  The requirement is mainly cultural,
arising out of the long time use of a pure boolean text engine.  Still, over the past fifteen
or so years, the user base has developed a fairly large body of "literature" -- queries they
use to find certain things -- and they don't want to throw all of that away.  I agree that
this type of thing is sort of specialized, but I thought there might just be a few others
out there with similar needs.  The need to highlight all of this is due to the fact that several
tools are use to post-process search results and visualize them.

I really appreciate the attention you guys have given to this.  There's the background from
my end.


> Extend contrib Highlighter to properly support PhraseQuery, SpanQuery,  ConstantScoreRangeQuery
> -----------------------------------------------------------------------------------------------
>                 Key: LUCENE-794
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Other
>            Reporter: Mark Miller
>            Priority: Minor
>         Attachments: SpanHighlighter-01-26-2008.patch, SpanHighlighter-01-28-2008.patch,
spanhighlighter.patch, spanhighlighter10.patch, spanhighlighter11.patch, spanhighlighter12.patch,
spanhighlighter2.patch, spanhighlighter3.patch, spanhighlighter5.patch, spanhighlighter6.patch,
spanhighlighter7.patch, spanhighlighter8.patch, spanhighlighter9.patch, spanhighlighter_24_January_2008.patch,
> This patch adds a new Scorer class (SpanQueryScorer) to the Highlighter package that
scores just like QueryScorer, but scores a 0 for Terms that did not cause the Query hit. This
gives 'actual' hit highlighting for the range of SpanQuerys, PhraseQuery, and  ConstantScoreRangeQuery.
New Query types are easy to add. There is also a new Fragmenter that attempts to fragment
without breaking up Spans.
> See for some background.
> There is a dependency on MemoryIndex.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message