lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anirudha Jadhav <aniru...@nyu.edu>
Subject Re: SolrCloud: Programmatically create multiple collections?
Date Tue, 13 Aug 2013 14:58:23 GMT
At this point you would need a higher level service sitting on top on solr
clusters which also talks to  your zk setup in order to create custom
collections on the fly.

its not super difficult, but seems out of scope for solrcloud  now.

let me know if others have a different opinion.

thanks,
Ani


On Tue, Aug 13, 2013 at 9:52 AM, Shawn Heisey <solr@elyograg.org> wrote:

> On 8/13/2013 3:07 AM, xinwu wrote:
> > When I managed collections via the Collections API.
> > How can I set the 'instanceDir' name?
> > eg:
> http://localhost:8983/solr/admin/collections?action=CREATE&name=mycollection&numShards=3&replicationFactor=4
> > My instanceDir is 'mycollection_shard2_replica1'.
> > How can I change it to 'mycollection'?
>
> I don't think the collections API can do this, and to be honest, I don't
> know why you would want to.  It would make it impossible to have more
> than one shard per Solr node, a capability that many people require.
> The question of "why would you want to?" is something I'm genuinely
> asking here.
>
> Admin URLs accessed directly by client programs are the only logical
> reason I can think of.  For querying and updating the index, you can use
> /solr/mycollection as a base URL to access your index, even though the
> shard names are different.  As for the admin URLs that let you access
> system information, SOLR-4943 will make most of that available without a
> core name in Solr 4.5.  To access core-specific information, you need to
> use the actual core name, but it should be possible to gather
> information about which machine has which core in an automated way.
>
> That said, if you create your collection a different way, you should be
> able to do exactly what you want.  What you would want to do is use the
> zkcli command "linkconfig" to link a new collection with an already
> uploaded config set, and then create the individual cores in your
> collection using the CoreAdmin API instead of the Collections API.
>
> http://wiki.apache.org/solr/SolrCloud#Command_Line_Util
> http://wiki.apache.org/solr/SolrCloud#Creating_cores_via_CoreAdmin
>
> Thanks,
> Shawn
>
>


-- 
Anirudha P. Jadhav

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message