[ 
https://issues.apache.org/jira/browse/LUCENE-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Miller updated LUCENE-1425:
--------------------------------

    Attachment: LUCENE-1425.patch

I'd like to go with this method as a stop gap solution for now. Its no worse 
than the previous approach of rewriting multi-term queries against the reader - 
in fact, its often much better as this approach rewrites against a memory index 
that only contains the doc to be highlighted.

I think its important that we offer some way to highlight all of the query 
types. Performance and improvements can come later.

This is an extension to the SpanScorer and won't affect the core Highlighter. 
So people can choose to use the SpanScorer if they want positional support (the 
non positional support is no slower), and then they can further choose if they 
want to expand multi term queries in the way provided (expanding multi-term 
defaults to false). Its generally going to work quite well, and the alternative 
at the moment is no highlighting.

A general better solution that does not work with positions would probably be 
better applied to the standard Highlighter, and then the SpanScorer can take 
advantage of it at that time. Until then, I'd like to offer full query type 
highlighting support with the SpanScorer since it is possible.

So this solution adds the ability to turn on highlighting of all the Querys 
that extend MutliTermQuery, constantscore mode true or false. That gives the 
SpanScorer almost full query type highlighting coverage I think.

> Add ConstantScore highlighting support to SpanScorer
> ----------------------------------------------------
>
>                 Key: LUCENE-1425
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1425
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: contrib/highlighter
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>         Attachments: LUCENE-1425.patch, LUCENE-1425.patch
>
>
> Its actually easy enough to support the family of constantscore queries with 
> the new SpanScorer. This will also remove the requirement that you rewrite 
> queries against the main index before highlighting (in fact, if you do, the 
> constantscore queries will not highlight).

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to