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

Dawid Weiss commented on LUCENE-8401:
-------------------------------------


bq. I wonder how interleaved hits should be handled. 

Just to throw more ideas here. :)

It'd be another possibility for a pluggable component. One implementation could 
resolve overlaps into contiguous fragments, another could create separate 
highlights, for example in different colors (or more saturated on the overlap 
region). (AAA[C)BBB] overlap would create three regions then, each with a 
possibly different highlighting marker: (AAA)(C)(BBB). The latter is useful in 
a interesting scenario where highlights come from two or more different sources 
(independent queries). Then the passage selector then needs to select window 
regions maximizing hit regions from each query and resolve overlaps to 
visualize where each query matched (with a different color, for example).


> Add PassageBuilder to help construct highlights using MatchesIterator
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-8401
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8401
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/highlighter
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Major
>         Attachments: LUCENE-8401.patch
>
>
> Jim and I discussed a while back the idea of adding highlighter components, 
> rather than a fully-fledged highlighter, which would allow users to build 
> their own specialised highlighters.  To that end, I'd like to add a 
> PassageBuilder class that uses the Matches API to break text up into passages 
> containing hits.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to