[ 
https://issues.apache.org/jira/browse/LUCENE-794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473969
 ] 

Mark Miller commented on LUCENE-794:
------------------------------------

I had some free time today and came back this issue. I was so set on my own 
needs to start on this that I completely ignored looking closely at the contrib 
highlighter code. I went back and read over it this morning and am in the 
middle of a new solution. The new solution is in the form of new 
SpanQueryScorer that extends Scorer and plugs into the original contrib 
highlighter code. I have adapted almost all of the original tests (still a few 
to go) and so far they all still pass using the SpanQueryScorer. There is no 
guarantee yet that Spans will not be chopped up, but I am sure there is a way 
to share Span info with a Fragmenter if you wanted to rectify this (I may get 
to it). I also have not implemented a scoring properly yet...at the moment any 
term that is found returns a score of 1, and each unique term in a fragment 
contributes 1 to the fragment score. I will look at going further here, but I 
will be posting the code first after I convert the rest of the relevant tests 
and add a few Span Query tests.

I am pretty confident this will be a great solution for 'actual hit' 
highlighting with the already tried and true contrib Highlighter, fragments and 
all.

-Mark

> Beginnings of a span based highlighter
> --------------------------------------
>
>                 Key: LUCENE-794
>                 URL: https://issues.apache.org/jira/browse/LUCENE-794
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Other
>            Reporter: Mark Miller
>            Priority: Minor
>         Attachments: CachedTokenStream.java, DefaultEncoder.java, 
> Encoder.java, Formatter.java, Highlighter.java, Highlighter.java, 
> Highlighter.java, Highlighter.java, HighlighterTest.java, 
> HighlighterTest.java, HighlighterTest.java, HighlighterTest.java, 
> MemoryIndex.java, QuerySpansExtractor.java, QuerySpansExtractor.java, 
> SimpleFormatter.java
>
>
> This is some test code to start the work of adding a span based highlighting 
> approach to the existing highlighter in contrib. See 
> http://issues.apache.org/jira/browse/LUCENE-403 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to