HTTP ERROR: 404 missing core name in path with solr

前端 未结 10 546
鱼传尺愫
鱼传尺愫 2020-12-05 16:58

I am new to Solr, after installing it in ubuntu 8.10, when I was trying exampledocs to index , as per this link, I got this error:

HTTP ERROR: 404 m

相关标签:
10条回答
  • 2020-12-05 17:53

    Just to keep a note here, if you deleted all files from your solr/data/index directory but left the directory alone and started getting this error, then stop solr, delete the solr/data/index directory and restart. Solr will create the index directory again. For some reason solr will give you this error if it finds the index directory but not the initial stuff it expects in there.

    0 讨论(0)
  • 2020-12-05 17:56

    You probably have a multi-core setup and haven't included the core in the URL. e.g. instead of requesting http://localhost:8983/solr/select/?q=*%3A* you have to request http://localhost:8983/solr/MyCoreName/select/?q=*%3A*

    0 讨论(0)
  • 2020-12-05 17:59

    I've gotten the same error:

    HTTP ERROR: 404 missing core name in path

    In my case I've forgotten so set the solr/home value in the WEB-INF/web.xml file

    <env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>/put/your/solr/home/here</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    

    After I've added the above code and restarted the server, the error was gone.

    0 讨论(0)
  • 2020-12-05 17:59

    My problem was in Tomcat Installed Dir\conf\Catalina\localhost\solr.xml

    <Context docBase="C\:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\solr" debug="0" crossContext="true" >
       <Environment name="solr/home" type="java.lang.String" value="D:\\workspace\\common\\src\\test\\resources\\solr\\cores" override="true" />
    </Context>
    

    The cores folder path was wrong for me, as I moved the workspace from one machine to another.

    0 讨论(0)
提交回复
热议问题