Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8778

Define analyzer SPI names as static final fields and document the names in Javadocs

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0, 8.3
    • modules/analysis
    • None
    • New

    Description

      Each built-in analysis component (factory of tokenizer / char filter / token filter)  has a SPI name but currently this is not  documented anywhere.

      The goals of this issue:

      • Define SPI names as static final field for each analysis component so that users can get the component by name (via NAME static field.) This also provides compile time safety.
      • Officially document the SPI names in Javadocs.
      • Add proper source validation rules to ant validate-source-patterns target so that we can make sure that all analysis components have correct field definitions and documentation

      and,

      • Lookup SPI names on the new NAME fields. Instead deriving those from class names.

      (Just for quick reference) we now have:

      • 19 Tokenizers (TokenizerFactory.availableTokenizers())
      • 6 CharFilters (CharFilterFactory.availableCharFilters())
      • 118 TokenFilters (TokenFilterFactory.availableTokenFilters())

      Attachments

        1. ListAnalysisComponents.java
          2 kB
          Tomoko Uchida
        2. LUCENE-8778-koreanNumber.patch
          0.9 kB
          Tomoko Uchida
        3. LUCENE-8778-migrate-note.patch
          1 kB
          Tomoko Uchida
        4. Screenshot from 2019-04-26 02-17-48.png
          37 kB
          Tomoko Uchida
        5. Screenshot from 2019-05-25 23-25-24.png
          39 kB
          Tomoko Uchida
        6. SPINamesGenerator.java
          3 kB
          Tomoko Uchida
        7. TestSPINames.java
          2 kB
          Tomoko Uchida

        Issue Links

          Activity

            People

              tomoko Tomoko Uchida
              tomoko Tomoko Uchida
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 4.5h
                  4.5h