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/05/13 16:45:59 UTC

[jira] [Created] (SOLR-7542) Schema API: Can't remove single dynamic copy field directive

Steve Rowe created SOLR-7542:
--------------------------------

             Summary: 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
             Fix For: 5.2


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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org