[
https://issues.apache.org/jira/browse/LUCENE-8401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545661#comment-16545661
]
David Smiley commented on LUCENE-8401:
--------------------------------------
This is a fine idea Alan. I especially like the peeking iterator idea.
* Should there be a new "o.a.l.highlighter.common" package for these components?
* typo: "continaing", "Definnes"
* Maybe PassageBuilder's lifecycle would be simpler if you simply re-create it
for each "text" value? Then it would quite simply be an Iterator<Passage>.
Well nevermind; there's the IOException and reuse of the Peeking thing.
* make Hit members protected and/or add getters. Someone might want to add
other interesting metadata.
* In Passage's Constructor, compare the end offset if start offset is equal.
(Comparator.thenComparing makes this easy). I ran into this ambiguity while
working on LUCENE-8286. Maybe Hit should implement Comparable?
> 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]