On 5/7/2015 11:03 AM, Tim Dunphy wrote:
> When I browse to /solr I see a link that points me to /solr/admin. And when
> I click on that link is when I see the error:
>
> *missing core name in path*
>
>
> I think what my problem is, is that I am not listing the cores correctly in
> the solr.xml file.
>
> This is what I have in my solr.xml file:
>
>   <solr persistent="false"
>       <cores adminPath="/admin/cores" defaultCoreName="collection1">
>          <core name="collection1" instanceDir="collection1" />
>        </cores>
>     </solr>
>
> So what I did was create a directory at solr/admin/cores and put
> collection1 there:
>
> [root@aoadbld00032la solr]# ls -ld admin/cores/collection1
> drwxr-xr-x. 5 root root 4096 May  6 17:29 admin/cores/collection1
>
> So, if I assume correctly, that the way I reference the collection1
> directory is the problem, how can I express this differently in my solr.xml
> file so that it works?

The adminPath (/admin/cores) is a *URL* path, not a *filesystem* path.

Let's back up a bit.

Your tomcat config needs some way to start Solr.  This can either be
done by dropping "solr.war" into an automatic deployment directory, or
placing an XML file (context fragment) telling Tomcat how to find the
.war, the context path (usually /solr) and possibly some other settings.

https://wiki.apache.org/solr/SolrTomcat#Installing_Solr_instances_under_Tomcat

Part of the config that you can give is a directory known as the Solr
Home.  If you don't specify it, it defaults to "./solr" -- meaning a
directory named "solr" in the current working directory of the process
that actually starts your container.  I highly recommend that you
specify the solr home, either with "-Dsolr.solr.home=/path/to/solr" on
the java commandline, or with a JNI environment variable named
"solr/home" in the context fragment.

Once you have your Solr Home figured out, you put your solr.xml file
there, and your instanceDir for each of your cores will be relative to
that directory as well.  Inside the instanceDir you must have a conf
directory, which contains solrconfig.xml and schema.xml, plus any other
config files referenced by those two files.

If you're running SolrCloud, then the config is in zookeeper, not on the
disk in the conf directory, but the instanceDir for each core works much
the same other than that.

I would recommend you have persistent set to true in your solrconfig.xml
file.  A great number of possible problems with the CoreAdmin API can be
avoided that way.

Thanks,
Shawn

Reply via email to