lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (LUCENE-8778) Define analyzer SPI names as static final fields and document the names in Javadocs
Date Fri, 26 Apr 2019 10:14:00 GMT


Uwe Schindler commented on LUCENE-8778:

Hi Tomoko,

the first step looks fine. But now we have 2 variants of the names: One is generated by the
SPI lookup mechanism and one is listed as static final field.

To make it complete, we have to change {{AnalysisSPILoader}} (see
to no longer guess the name from the class name but instead do a reflective lookup on the
new "NAME" field to get the name. We can then also remove the "suffixes" from the whole algorithm.
I can assist with that. This allows us to also make the names customizeable.

This also makes the checks for the "NAME" static final field in our source code checker obsolete,
as the SPI mechanism looks fo existence of the NAME field anyways.

> Define analyzer SPI names as static final fields and document the names in Javadocs
> -----------------------------------------------------------------------------------
>                 Key: LUCENE-8778
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: modules/analysis
>            Reporter: Tomoko Uchida
>            Priority: Minor
>         Attachments: Screenshot from 2019-04-26 02-17-48.png
>          Time Spent: 20m
>  Remaining Estimate: 0h
> 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
> (Just for quick reference) we now have:
>  * *19* Tokenizers ({{TokenizerFactory.availableTokenizers()}})
>  * *6* CharFilters ({{CharFilterFactory.availableCharFilters()}})
>  * *118* TokenFilters ({{TokenFilterFactory.availableTokenFilters()}})

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message