[
https://issues.apache.org/jira/browse/SOLR-13593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16881845#comment-16881845
]
Uwe Schindler commented on SOLR-13593:
--------------------------------------
While thinking about the next 8.x release: Actually because of the
Lucene-change we already have a backwards-incompatible change in Lucene: If you
implemented your own factory classes, you have to add the "NAME" field,
otherwise the factory and (I think) all other factories won't initialize! This
means that it may happen that somebody has an old JAR file with 3rd party
analyzers in classpath and this fails to load the whole analyzer factory,
making Solr unusable.
Maybe in 8.x we need some "transparent" backwards compatibility, so
"incomplete" factories won't hurt loading the SPI framework, or we just emulate
the old name. Should I maybe open another issue about this. Curretly I am a bit
afraid of releasing the new factory interface without a migration path.
For 9.0 all is fine.
> Allow to specify analyzer components by their SPI names in schema definition
> ----------------------------------------------------------------------------
>
> Key: SOLR-13593
> URL: https://issues.apache.org/jira/browse/SOLR-13593
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Schema and Analysis
> Reporter: Tomoko Uchida
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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.:
> {code:xml}
> <fieldtype name="myfieldtype" class="solr.TextField">
> <analyzer>
> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"
> />
> <filter class="solr.PorterStemFilterFactory" />
> </analyzer>
> </fieldtype>
> {code}
> would be
> {code:xml}
> <fieldtype name="myfieldtype" class="solr.TextField">
> <analyzer>
> <tokenizer name="whitespace"/>
> <filter name="keywordMarker" protected="protwords.txt" />
> <filter name="porterStem" />
> </analyzer>
> </fieldtype>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]