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

David Smiley commented on LUCENE-7355:
--------------------------------------

I like the new Analyzer.attributeFactory() method but I don't like that it 
documents that it's for #normalize -- as if it should only be used for 
normalize.  Wouldn't it be useful for createComponents() too?  That would be a 
bigger change, however, since there are lots of times when a Tokenizer is 
created within the context of an Analyzer that would ideally be updated to call 
this method.  That seems like it deserves its own issue?  Or maybe for the time 
being we will accept that it's currently only used by normalize.  It would be 
nice to see CustomAnalyzer have a customizable AttributeFactory for TokenStream 
and to be returned by this proposed method.

bq. That said, maybe the method approach is better since borrowing the 
attribute factory from the regular analysis chain makes us close the token 
stream before it has been consumed, which some analysis chains might not like.

I think token streams should be tolerant of this or something in the TS chain 
is broken IMO.

RE Solr, I only mean if there is an <analyzer class="..." type="query"> and 
thus the actual chain is opaque to Solr so it can't use it's normal means of 
determining the default multiTerm analysis chain.  This is a bit of a fringe 
issue any way since in my experience setting class= is rare.

BTW nice work on this issue; it's nice to see AnalyzingQueryParser go away and 
the lowercase options get removed.

> Leverage MultiTermAwareComponent in query parsers
> -------------------------------------------------
>
>                 Key: LUCENE-7355
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7355
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7355.patch, LUCENE-7355.patch, LUCENE-7355.patch, 
> LUCENE-7355.patch, LUCENE-7355.patch, LUCENE-7355.patch
>
>
> MultiTermAwareComponent is designed to make it possible to do the right thing 
> in query parsers when in comes to analysis of multi-term queries. However, 
> since query parsers just take an analyzer and since analyzers do not 
> propagate the information about what to do for multi-term analysis, query 
> parsers cannot do the right thing out of the box.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to