You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2015/06/19 22:30:00 UTC

[jira] [Resolved] (SOLR-7679) Schema API doesn't take similarity attribute into account when adding field types

     [ https://issues.apache.org/jira/browse/SOLR-7679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Rowe resolved SOLR-7679.
------------------------------
    Resolution: Fixed
      Assignee: Steve Rowe

Committed to trunk and branch_5x.

Thanks Marius!

> Schema API doesn't take similarity attribute into account when adding field types
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-7679
>                 URL: https://issues.apache.org/jira/browse/SOLR-7679
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 5.2
>            Reporter: Marius Grama
>            Assignee: Steve Rowe
>            Priority: Minor
>             Fix For: 5.3, Trunk
>
>         Attachments: SOLR-7679.patch, SOLR-7679.patch, SOLR-7679.patch
>
>
> When using the request
> {code}
> curl -X POST -H 'Content-type:application/json' --data-binary '{
>   "add-field-type": {
>     "name": "fieldTypeWithSimilarity",
>     "class": "org.apache.solr.schema.TextField",
>     "analyzer": {
>       "charFilters": [
>         {
>           "class": "solr.PatternReplaceCharFilterFactory",
>           "replacement": "$1$1",
>           "pattern": "([a-zA-Z])\\\\1+"
>         }
>       ],
>       "tokenizer": {
>         "class": "solr.WhitespaceTokenizerFactory"
>       }
>     },
>     "similarity": {
>       "class": "org.apache.lucene.misc.SweetSpotSimilarity"
>     }
>   }
> }' http://localhost:8983/solr/gettingstarted/schema
> {code}
> can be seen in the updated schema.xml that the similarity attributes for the newly added field type doesn't contain a _similarity_ entry.
> This is due to the fact that within FieldTypeXmlAdapter the similiarity element is not being added to the field type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org