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

Nik Everett commented on LUCENE-5274:
-------------------------------------

> 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.

The PerFieldAnalyzerWrapper was the thing that pulled me there.  I'd appreciate 
some tips on how to work around that.  I'll have a look at removing the query 
parser dependency.  I'm also using the EnglishAnalzyer but I'm just using that 
to have a third analyzer in the mix.  I'll see about using MockAnalzyer for 
that too.

> 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?

I don't like retrieving the indexed fields from the query - what if you don't 
want them all?  how can you make sure that the ones that you take from the 
query really do share the same stored copy.

As far as calling out the stored field and the indexed field separately - I 
think I like the idea.  It'd let you load the source from a field that isn't 
actively being highlighted.  I'll have a look at that.

> 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]

Reply via email to