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

Munendra S N reassigned SOLR-14950:
-----------------------------------

    Assignee: Munendra S N

> schema api sometimes fails to replace-field-type
> ------------------------------------------------
>
>                 Key: SOLR-14950
>                 URL: https://issues.apache.org/jira/browse/SOLR-14950
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Schema and Analysis
>    Affects Versions: 8.4.1
>            Reporter: Andrew Shumway
>            Assignee: Munendra S N
>            Priority: Minor
>              Labels: schema
>
> When updating a schema via POST to  {{/solr/COLLECTION/schema}} using  
> {{replace-field-type}} , the call fails if the schema has existing 
> copy-fields whose destination references a non-dynamic field of the  
> {{field-type}} which is being updated.
>  
> Example steps: # on a blank schema, add a field type and copy-field by POSTing
> {
>   "add-field-type": [
>     {
>       "name": "spellcheck", "class": "solr.TextField","positionIncrementGap": 
> "100",
>       "analyzer": {
>         "tokenizer": {
>           "class": "solr.StandardTokenizerFactory"
>         }
>       }
>     }
>   ],
>   "add-field": [
>     {
>       "name": "spellcheck",  "type": "spellcheck",
>       "multiValued": true, "indexed": true, "stored": true
>     }
>   ],
>   "add-copy-field": [
>     {
>       "source": "important_data_s",
>       "dest": "spellcheck"
>     }
>   ]
> }
> 2. Later, send an update for the field type
> {
>   "replace-field-type": [
>     {
>       "name": "spellcheck", "class": "solr.TextField","positionIncrementGap": 
> "100",
>       "analyzer": {
>         "tokenizer": {
>           "class": "solr.StandardTokenizerFactory"
>         }
>       }
>     }
>   ]
> }
> This results in {{"errorMessages":["Source or Destination SchemaField can't 
> be NULL.\n"]}],}}The error does not trigger if, as mentioned above, the 
> destination of the existing copy-field is dynamic OR if the source field 
> mapping contains a wildcard e.g. {{*foo_s}} (edited) 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to