0

While I was trying to upgrade from Solr 3.5 to 4.6, I encountered this error.

{msg=SolrCore 'core0' is not available due to init failure: default search field 'name' not defined or not indexed. Schema file is /opt/jetty/solr/./cores/core0/schema.xml,trace=org.apache.solr.common.SolrException: SolrCore 'core0' is not available due to init failure: default search field 'name' not defined or not indexed. Schema file is /opt/jetty/solr/./cores/core0/schema.xml
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:818)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:289)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:197)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:620)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:722)

Caused by: org.apache.solr.common.SolrException: default search field 'name' not defined or not indexed. Schema file is /opt/jetty/solr/./cores/core0/schema.xml at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:608) at org.apache.solr.schema.IndexSchema.(IndexSchema.java:166) at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55) at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:554) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:592) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:271) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:263) 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:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) ... 1 more Caused by: org.apache.solr.common.SolrException: default search field 'name' not defined or not indexed at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:507) ... 15 more ,code=500}

On my schema.xml

<field name="name" type="text_general" indexed="true" stored="true" required="false" />

On my data-config.xml

<field column="name" name="name"/>

I already did tried to comment out those fields then restart jetty server but no specific errors even on log files.

  • That schema field is set up in /opt/jetty/solr/cores/core0/schema.xml and not a schema.xml somewhere else, right? – Shane Madden Jan 28 '14 at 20:23
  • yes correct since this is multi-core. – mikelcelestial Jan 29 '14 at 14:16
  • Strange. Is that schema field showing up properly when you check the running schema in the admin web ui? – Shane Madden Jan 29 '14 at 16:43
  • 1
    At a first glance this looks like a SOLR bug - have you poked their developers? – voretaq7 Jan 29 '14 at 16:45
  • @ShaneMadden any urls I access are being stopped by this error so I can't check the running schema, only via file. – mikelcelestial Jan 29 '14 at 17:03
-1

From version 3.x to 4.x Solr has changed its schema.xml structure. In 4.x versions is no longer a < types> list nor < fields>, only < type> and < field> objects.

Try commenting the < types>< /types> and < fields>< /fields> pairs of tags in the schema.xml

Hope it is useful!

  • I don't actually see a <fields> or <types> tag in there? – Reaces Feb 12 '15 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.