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

Allow to look-up analyzer components by their SPI names in field type configuration

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0
    • Schema and Analysis
    • None

    Description

      Now each analysis factory has explicitely documented SPI name which is stored in the static "NAME" field (LUCENE-8778).
      Solr uses factories' simple class name in schema definition (like class="solr.WhitespaceTokenizerFactory"), but we should be able to also use more concise SPI names (like name="whitespace").

      e.g.:

      <fieldtype name="myfieldtype" class="solr.TextField">
        <analyzer>
          <tokenizer class="solr.WhitespaceTokenizerFactory"/>
          <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
          <filter class="solr.PorterStemFilterFactory" />
        </analyzer>
      </fieldtype>
      

      would be

      <fieldtype name="myfieldtype" class="solr.TextField">
        <analyzer>
          <tokenizer name="whitespace"/>
          <filter name="keywordMarker" protected="protwords.txt" />
          <filter name="porterStem" />
        </analyzer>
      </fieldtype>
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tomoko Tomoko Uchida
            tomoko Tomoko Uchida
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                Slack

                  Issue deployment