Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8460

/analysis/field doesn't always handle custom attributes correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3.2, 5.4.1, 5.5
    • Component/s: Schema and Analysis
    • Labels:
      None

      Description

      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.

        Attachments

        1. SOLR_8460.patch
          10 kB
          David Smiley
        2. SOLR_8460.patch
          10 kB
          David Smiley

          Activity

            People

            • Assignee:
              dsmiley David Smiley
              Reporter:
              dsmiley David Smiley
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: