You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Chris M. Hostetter (Jira)" <ji...@apache.org> on 2022/05/18 23:20:00 UTC

[jira] [Commented] (SOLR-13593) Allow to look-up analyzer components by their SPI names in field type configuration

    [ https://issues.apache.org/jira/browse/SOLR-13593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539125#comment-17539125 ] 

Chris M. Hostetter commented on SOLR-13593:
-------------------------------------------

*NOTE:* This functionality can cause weird and confusing errors for _some_ analyzer components (ones that are {{ResourceLoaderAware}} when using these analyzers at index/query time ... *IF* you are using {{ClassicIndexSchemaFactory}}

This bug is being tracked in SOLR-16203.

> Allow to look-up analyzer components by their SPI names in field type configuration
> -----------------------------------------------------------------------------------
>
>                 Key: SOLR-13593
>                 URL: https://issues.apache.org/jira/browse/SOLR-13593
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Tomoko Uchida
>            Assignee: Tomoko Uchida
>            Priority: Major
>             Fix For: 9.0
>
>         Attachments: SOLR-13593-add-spi-ReversedWildcardFilterFactory.patch, SOLR-13593.patch
>
>          Time Spent: 40m
>  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
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org