[jira] [Updated] (SOLR-8460) /analysis/field doesn't always handle custom attributes correctly
[ https://issues.apache.org/jira/browse/SOLR-8460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrien Grand updated SOLR-8460: --- Fix Version/s: 5.4.1 > /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.3.2, 5.5, 5.4.1 > > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-8460) /analysis/field doesn't always handle custom attributes correctly
[ https://issues.apache.org/jira/browse/SOLR-8460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Smiley updated SOLR-8460: --- Attachment: SOLR_8460.patch In this updated patch, I ensured that attributes are added in incrementToken too. However I kept it using addAttributeImpl, with the following comment: {noformat} // note: ideally we wouldn't call addAttributeImpl which is marked internal. But nonetheless it's possible // this method is used by some custom attributes, especially since Solr doesn't provide a way to customize the // AttributeFactory which is the recommended way to choose which classes implement which attributes. {noformat} > /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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-8460) /analysis/field doesn't always handle custom attributes correctly
[ https://issues.apache.org/jira/browse/SOLR-8460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Smiley updated SOLR-8460: --- Attachment: SOLR_8460.patch See attached patch. This fix is for ARHB.ListBasedTokenStream to take an AttributeSource in the constructor to serve as the source of the attribute impls which are added in the constructor in a loop. This adds the attributes as side effect as well. There is then no reason to copy the defined attributes in incrementToken because it's done in the constructor. I'll commit in a couple days pending feedback. > /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 > > > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org