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

Uwe Schindler commented on SOLR-8460:
-------------------------------------

+1

bq. especially since Solr doesn't provide a way to customize the 
AttributeFactory which is the recommended way to choose which classes implement 
which attributes.

The correct way to do this is to write a separate/duplicate factory for your 
Tokenizer that uses another attributefactory. You have to do this anyways, 
because adding custom attributes later will likely fail, if the tokenizer 
already added them.

> /analysis/field doesn't always handle custom attributes correctly
> -----------------------------------------------------------------
>
>                 Key: SOLR-8460
>                 URL: https://issues.apache.org/jira/browse/SOLR-8460
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: 5.5
>
>         Attachments: SOLR_8460.patch, SOLR_8460.patch
>
>
> I've got some custom analysis Attribute implementations in my analysis chain 
> with some other custom analysis components.  I found that Solr's Analysis 
> utility screen, powered by /field/analysis (FieldAnalysisRequestHandler 
> subclassing AnalysisRequestHandlerBase) gave me exceptions for two reasons, 
> both having to do with AnalysisRequestHandlerBase.ListBasedTokenStream:
> * Custom implementations of standard Attributes (e.g. FlagsAttribute) would 
> trigger an exception.
> * Calling getAttribute (instead of addAttribute) in a TokenFilter constructor 
> wouldn't find an attribute added by the input TokenStream.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to