-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 5.1
-
Fix Version/s: 5.2
-
Component/s: None
-
Labels:None
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:
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_"}}'
The deletion fails, and an NPE is logged:
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) [...]