[
https://issues.apache.org/jira/browse/LUCENE-5274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793018#comment-13793018
]
Nik Everett commented on LUCENE-5274:
-------------------------------------
{quote}
I can see the possible use case here, but I think it deserves some discussion
first (versus just making it public).
{quote}
Sure! I'm more used to Guava's tools so I think I was lulled in to a false
sense of recognition. No chance of updating to a modern version of Guava?:)
{quote}
This thing has limitations (its currently only used by indexwriter for
buffereddeletes, its basically like a MultiTerms over an Iterator). For example
each iterator it consumes should not have duplicate values according to its
compareTo(): its not clear to me this WeightedPhraseInfo behaves this way
{quote}
Yikes! I didn't catch that but now that you point it out it is right there in
the docs and I should have. WeightedPhraseInfo doesn't behave that way and
{quote}
Furthermore the class in question (WeightedPhraseInfo) is public, and adding
Comparable to it looks like it will create a situation where its inconsistent
with equals()... I think this is a little dangerous.
{quote}
I agree on the inconsistent with inconsistent with equals. I can either fix
that or use a Comparator for sorting both WeightedPhraseInfo and Toffs. That'd
require a MergeSorter that can take one but
{quote}
If it turns out we can reuse it: great! But i think rather than just slapping
public on it, we should move it to .util, ensure it has good javadocs and unit
tests, and investigate what exactly happens when these contracts are violated:
e.g. can we make an exception happen rather than just broken behavior in a way
that won't hurt performance and so on?
{quote}
Makes sense to me.
> Teach fast FastVectorHighlighter to highlight "child fields" with parent
> fields
> -------------------------------------------------------------------------------
>
> Key: LUCENE-5274
> URL: https://issues.apache.org/jira/browse/LUCENE-5274
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/other
> Reporter: Nik Everett
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-5274.patch
>
>
> I've been messing around with the FastVectorHighlighter and it looks like I
> can teach it to highlight matches on "child fields". Like this query:
> foo:scissors foo_exact:running
> would highlight foo like this:
> <em>running</em> with <em>scissors</em>
> Where foo is stored WITH_POSITIONS_OFFSETS and foo_plain is an unstored copy
> of foo a different analyzer and its own WITH_POSITIONS_OFFSETS.
> This would make queries that perform weighted matches against different
> analyzers much more convenient to highlight.
> I have working code and test cases but they are hacked into Elasticsearch.
> I'd love to Lucene-ify if you'll take them.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]