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

Jim Ferenczi commented on LUCENE-8401:
--------------------------------------

I like the approach here. A few comments:
* The text extraction for each passage should be delayed to the end. It's 
costly and should be done on the best passages only (assuming that only the 
best passages are kept).
* Maybe something that the PassageFormatter should handle but I wonder how 
interleaved hits should be handled. Since we don't split intervals we need to 
be careful to avoid highlighting the same term twice (from a term query and a 
phrase query for instance). 
* findPassageStart should be bounded to the end offset of the last passage.
* findPassageEnd should be bounded to the start offset of the next passage.


> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to