You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alexander Albrecht <aa...@gmail.com> on 2015/01/27 18:40:34 UTC

AdminUI wrong core name

Hi,
 i think i found a bug in the AdminUI.

When i create a new collection with the Collection API, the name of the
core is displayed wrong in the AdminUI.

This is the call:

http://localhost:8983/solr/admin/collections?action=CREATE&name=mycollection&collection.configName=myconfig&property.name=mycollection&numShards=1&property.instanceDir=mycollection

The core.properties has the correct value: name=mycollection, but in the
AdminUI the new core has the name mycollection_shard1_replica1.

Only after a restart of the solr server the right name "mycollection" is
shown in the AdminUI.

Re: AdminUI wrong core name

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/27/2015 10:40 AM, Alexander Albrecht wrote:
> Hi,
>  i think i found a bug in the AdminUI.
>
> When i create a new collection with the Collection API, the name of the
> core is displayed wrong in the AdminUI.
>
> This is the call:
>
> http://localhost:8983/solr/admin/collections?action=CREATE&name=mycollection&collection.configName=myconfig&property.name=mycollection&numShards=1&property.instanceDir=mycollection
>
> The core.properties has the correct value: name=mycollection, but in the
> AdminUI the new core has the name mycollection_shard1_replica1.

If you are using the collections API to create a new collection, then
all cores will have a name with this format:

mycollection_shardX_replicaY

I believe that in Solr 4.0.0, the created core names were identical to
the collection name, but this changed in 4.1.0.  Since that change, it
is possible to create a collection where one Solr instance can host more
than one shard from that collection, which would not be possible with
the core having the same name.  Note that even with the new core name
format, you can still use the collection name in query requests: 
Sending /solr/mycollection/select?q=foo DOES work, even though there are
no cores named "mycollection".

If the core.properties file does not have the _shardX_replicaY format as
the core name, then *that* is the bug.

Overriding properties like instanceDir and dataDir can lead to problems
and confusion unless you know EXACTLY what you are doing.  I would not
recommend doing it.

Thanks,
Shawn