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

Steve Rowe resolved SOLR-7542.
------------------------------
    Resolution: Fixed

Committed to trunk and branch_5x.

> Schema API: Can't remove single dynamic copy field directive
> ------------------------------------------------------------
>
>                 Key: SOLR-7542
>                 URL: https://issues.apache.org/jira/browse/SOLR-7542
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 5.1
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>             Fix For: 5.2
>
>         Attachments: SOLR-7542.patch
>
>
> In a managed schema containing just a single dynamic copy field directive - 
> i.e. a glob source or destination - deleting the copy field directive fails.  
> For example, the default configset (data_driven_schema_configs) has such a 
> schema: the {{*}}->{{\_text\_}} copy field directive is the only one. 
> To reproduce:
> {noformat}
> bin/solr start -c
> bin/solr create my_solr_coll
> curl "http://localhost:8983/solr/my_solr_coll/schema"; 
> -d'{"delete-copy-field":{"source":"*", "dest":"_text_"}}'
> {noformat}
> The deletion fails, and an NPE is logged: 
> {noformat}
> ERROR - 2015-05-13 12:37:36.780; [my_solr_coll shard1 core_node1 
> my_solr_coll_shard1_replica1] org.apache.solr.common.SolrException; 
> null:java.lang.NullPointerException
>         at 
> org.apache.solr.schema.IndexSchema.getCopyFieldProperties(IndexSchema.java:1450)
>         at 
> org.apache.solr.schema.IndexSchema.getNamedPropertyValues(IndexSchema.java:1406)
>         at org.apache.solr.schema.IndexSchema.persist(IndexSchema.java:390)
>         at 
> org.apache.solr.schema.SchemaManager.doOperations(SchemaManager.java:120)
>         at 
> org.apache.solr.schema.SchemaManager.performOperations(SchemaManager.java:94)
>         at 
> org.apache.solr.handler.SchemaHandler.handleRequestBody(SchemaHandler.java:57)
>         at 
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1984)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:829)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:446)
>         at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:220)
> [...]
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to