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

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

    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

        1. SOLR-13593-add-spi-ReversedWildcardFilterFactory.patch
          0.8 kB
          Tomoko Uchida
        2. SOLR-13593.patch
          39 kB
          Tomoko Uchida

        Issue Links

          Activity

            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