[ 
https://issues.apache.org/jira/browse/SOLR-5000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13699188#comment-13699188
 ] 

Steve Rowe commented on SOLR-5000:
----------------------------------

Thanks for reporting, Jun, I can reproduce this, but I'm not sure yet what's 
happening.

When ManagedIndexSchema persists to disk or ZooKeeper, it asks parent class 
IndexSchema to populate a NamedList containing all schema elements, including 
the unique key field name, and then uses SchemaXmlWriter to convert the 
NamedList to XML.  SchemaXmlWriter looks for the unique key property and 
appears to do the right thing.  So my suspicion at this point is that 
IndexSchema.uniqueKeyFieldName isn't being populated when the schema is parsed, 
though IndexSchema.uniqueKeyField obviously must be populated, or else stuff 
wouldn't work.  I'll look into it more later today.
                
> ManagedIndexSchema not persist uniqueKey tag after calling addFields method.
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-5000
>                 URL: https://issues.apache.org/jira/browse/SOLR-5000
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 4.4
>            Reporter: Jun Ohtani
>            Assignee: Steve Rowe
>             Fix For: 4.4
>
>
> My co-worker found this one.
> I try to add field via Schema REST API using example-schemaless/solr.
> There is no problem starting sold at first time.
> But restart Jetty, then output this error.
> 8385 [qtp620249139-18] ERROR org.apache.solr.servlet.SolrDispatchFilter  – 
> null:org.apache.solr.common.SolrException: SolrCore 'collection1' is not 
> available due to init failure: QueryElevationComponent requires the schema to 
> have a uniqueKeyField.
>       at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:971)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:248)
>       at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
>       at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>       at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
>       at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
>       at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>       at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
>       at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>       at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>       at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
>       at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>       at org.eclipse.jetty.server.Server.handle(Server.java:368)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>       at 
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
>       at 
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
>       at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
>       at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
>       at 
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
>       at 
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>       at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>       at java.lang.Thread.run(Thread.java:724)
> Caused by: org.apache.solr.common.SolrException: QueryElevationComponent 
> requires the schema to have a uniqueKeyField.
>       at org.apache.solr.core.SolrCore.<init>(SolrCore.java:833)
>       at org.apache.solr.core.SolrCore.<init>(SolrCore.java:627)
>       at 
> org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:733)
>       at org.apache.solr.core.CoreContainer.create(CoreContainer.java:768)
>       at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:439)
>       at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:431)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       ... 1 more
> Caused by: org.apache.solr.common.SolrException: QueryElevationComponent 
> requires the schema to have a uniqueKeyField.
>       at 
> org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:177)
>       at 
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:599)
>       at org.apache.solr.core.SolrCore.<init>(SolrCore.java:828)
>       ... 13 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to