lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hokam Singh Chauhan <hokam.1...@gmail.com>
Subject Error while adding copy fields to a schema
Date Wed, 03 Sep 2014 06:22:49 GMT
Hi,

I have an requirement in which I have to add some fields in schema at run
time and after that i need to add the copy fields for some of the schema
fields.

To add the fields in schema I used the following REST API, which is giving
success response in output as shown below:

*Post URL: *http://localhost:8080/solr/bookindex/schema/fields
*Content-type :* application/json
*Post Data :*
[
  {
    "indexed": "true",
    "name": "age",
    "stored": "true",
    "type": "long"
  },
  {
    "indexed": "true",
    "name": "sex",
    "stored": "true",
    "type": "string"
  },
  {
    "indexed": "true",
    "name": "_all",
    "stored": "true",
    "type": "string",
    "multiValued" : "true"
  }
]

*Output Response :*
{
  "responseHeader":{
    "status":0,
    "QTime":202
  }
}

After adding these fields in schema, as I executing the second call to add
the copy fields in schema, i am getting an error *"Error persisting managed
schema at /configs/myconf/managed-schema" *in response.

Following are the details about REST API which i am using to add the copy
fields along with error response.


*Post URL: *http://localhost:7070/solr/bookindex/schema/copyfields
*Content-type : *application/json
*Post Data : *
[
{
"source":"age",
"dest": "_all"
},
{
"source":"sex",
"dest": "_all"
}
]
*Output Response :*
{
  "responseHeader":{
    "status":500,
    "QTime":190},
  "error":{
    "msg":"Error persisting managed schema at
/configs/myconf/managed-schema",
    "trace":"org.apache.solr.common.SolrException: Error persisting managed
schema at /configs/myconf/managed-schema\n\tat
org.apache.solr.schema.ManagedIndexSchema.persistManagedSchemaToZooKeeper(ManagedIndexSchema.java:166)\n\tat
org.apache.solr.schema.ManagedIndexSchema.persistManagedSchema(ManagedIndexSchema.java:83)\n\tat
org.apache.solr.schema.ManagedIndexSchema.addCopyFields(ManagedIndexSchema.java:281)\n\tat
org.apache.solr.rest.schema.CopyFieldCollectionResource.post(CopyFieldCollectionResource.java:174)\n\tat
org.restlet.resource.ServerResource.doHandle(ServerResource.java:437)\n\tat
org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:350)\n\tat
org.restlet.resource.ServerResource.handle(ServerResource.java:952)\n\tat
org.restlet.resource.Finder.handle(Finder.java:246)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.routing.Router.doHandle(Router.java:431)\n\tat
org.restlet.routing.Router.handle(Router.java:648)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)\n\tat
org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)\n\tat
org.restlet.Application.handle(Application.java:381)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.routing.Router.doHandle(Router.java:431)\n\tat
org.restlet.routing.Router.handle(Router.java:648)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.routing.Router.doHandle(Router.java:431)\n\tat
org.restlet.routing.Router.handle(Router.java:648)\n\tat
org.restlet.routing.Filter.doHandle(Filter.java:159)\n\tat
org.restlet.routing.Filter.handle(Filter.java:206)\n\tat
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)\n\tat
org.restlet.Component.handle(Component.java:392)\n\tat
org.restlet.Server.handle(Server.java:516)\n\tat
org.restlet.engine.ServerHelper.handle(ServerHelper.java:72)\n\tat
org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:152)\n\tat
org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1089)\n\tat
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)\n\tat
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:276)\n\tat
org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:367)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:368)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)\n\tat
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)\n\tat
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)\n\tat
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)\n\tat
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)\n\tat
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat
java.lang.Thread.run(Thread.java:722)\nCaused by:
java.lang.NullPointerException\n\tat
org.apache.solr.schema.IndexSchema.getCopyFieldProperties(IndexSchema.java:1418)\n\tat
org.apache.solr.schema.IndexSchema.getNamedPropertyValues(IndexSchema.java:1375)\n\tat
org.apache.solr.schema.IndexSchema.persist(IndexSchema.java:379)\n\tat
org.apache.solr.schema.ManagedIndexSchema.persistManagedSchemaToZooKeeper(ManagedIndexSchema.java:137)\n\t...
79 more\n",
    "code":500}}

Please help why this error is coming ?

Thanks,
Hokam

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message