[
https://issues.apache.org/jira/browse/LUCENE-5274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13791909#comment-13791909
]
Adrien Grand commented on LUCENE-5274:
--------------------------------------
Thanks Nick for working on this issue, I think this is nice to be able to
highlight queries that target fields which have the same content but are
analyzed differently!
bq. I made the highlighter module depend on the query string parser and
analyzer modules for testing. I probably could have gotten away without the
query string parser but it made the test cases simpler to write.
We tend to avoid doing that in order to not have cross or circular dependencies
between modules. This is not an issue at this stage of the patch but we should
try replacing the analysis components you are using with MockAnalyzer at some
point.
I only had a quick look at the patch so far and I'm a bit unsure about
childFields. Maybe it would be better API-wise to specify the stored field and
the index fields separately? Or maybe to retrieve the index fields from the
terms of the query? What do you think?
> 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]