Re: Solrcloud: 1 server, 1 configset, multiple collections, multiple schemas
F*ck. I switched from normal Solr to SolrCloud, thanks to the feature that allow to create cores (collections) on-the-fly with the API, without having to tell Solr where to find a schema.xml / a solrconfig.xml and let it create them itself from a pre-defined configset. If I understand well, there is actually no way to create a core or a collection from the API, with a defined-at-once configset, without having to do some CLI commands on the remote server? Thanks for your reply, Ben -- View this message in context: http://lucene.472066.n3.nabble.com/Solrcloud-1-server-1-configset-multiple-collections-multiple-schemas-tp4243584p4244010.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solrcloud: 1 server, 1 configset, multiple collections, multiple schemas
On 12/7/2015 9:46 AM, bengates wrote: > If I understand well, there is actually no way to create a core or a > collection from the API, with a defined-at-once configset, without having to > do some CLI commands on the remote server? With SolrCloud, the only step that requires commandline is uploading the configuration to zookeeper, which is done with the zkcli script included with Solr. This script talks to zookeeper over the TCP network socket, so it can be run from anywhere with network access to the zookeeper servers. You do not need to run it directly on the remote Solr server. With a zookeeper client that's not solr-specific, you may be able to have even more control, but it won't be as easy as zkcli. I've used the zookeeper plugin for eclipse, but their website seems to be broken. Here's the URL, I hope it starts working at some point: http://www.massedynamic.org/mediawiki/index.php?title=Eclipse_Plug-in_for_ZooKeeper Thanks, Shawn
Re: Solrcloud: 1 server, 1 configset, multiple collections, multiple schemas
You have to upload the different configset with the zookeeper client (this is done for you when you do the examples) using zkcli, see the "upconfig" command here; https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities Similarly, you need to make changes locally (perhaps after doing a "downconfig" and push them back up. the new Admin UI does allow you to manipulate schemas from the UI, but you have to both have them be "managed" and do the initial upconfig(s) yourself. Now, apart from this step, the rest of the collection operations are available through the API. Best, Erick On Sat, Dec 5, 2015 at 12:56 AM, bengateswrote: > I understand. > > How to do this via the API? > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Solrcloud-1-server-1-configset-multiple-collections-multiple-schemas-tp4243584p4243737.html > Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solrcloud: 1 server, 1 configset, multiple collections, multiple schemas
I understand. How to do this via the API? -- View this message in context: http://lucene.472066.n3.nabble.com/Solrcloud-1-server-1-configset-multiple-collections-multiple-schemas-tp4243584p4243737.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solrcloud: 1 server, 1 configset, multiple collections, multiple schemas
If you want two different collections to have two different schemas, those collections need to reference two different configsets. So you need another copy of your config available using a different name, and to reference that other name when you create the second collection. On 12/4/15, 6:26 AM, "bengates"wrote: >Hello, > >I'm having usage issues with *Solrcloud*. > >What I want to do: >- Manage a solr server *only with the API* (create / reload / delete >collections, create / replace / delete fields, etc). >- A new collection should* start with pre-defined default fields, >fieldTypes >and copyFields* (let's say, field1 and field2 for fields). >- Each collection must *have its own schema*. > >What I've setup yet: >- Installed a *Solr 5.3.1* in //opt/solr/ on an Ubuntu 14.04 server >- Installed *Zookeeper 3.4.6* in //opt/zookeeper/ as described in the solr >wiki >- Added line "server.1=127.0.0.1:2888:3888" in >//opt/zookeeper/conf/zoo.cfg/ >- Added line "127.0.0.1:2181" in >//var/solr/data/solr.xml/ >- Told solr or zookeeper somewhere (don't remember where I setup this) to >use //home/me/configSet/managed-schema.xml/ and >//home/me/configSet/solrconfig.xml/ for configSet >- Run solr on port 8983 > >My //home/me/configSet/managed-schema.xml/ contains *field1* and *field2*. > >Now let's create a collection: >http://my.remote.addr:8983/solr/admin/collections?action=CREATE=colle >ction1=1 >- *collection1 *is created, with *field1 *and *field2*. Perfect. > >Let's create another collection: >http://my.remote.addr:8983/solr/admin/collections?action=CREATE=colle >ction2=1 >- *collection2 *is created, with *field1 *and *field2*. Perfect. > >No, if I *add some fields* on *collection1 *by POSTing to : >/http://my.remote.addr:8983/solr/collection1/schema/ the following: > > >- *field3 *and *field4 *are successfully added to *collection1* >- ... but they are *also added* to *collection2* (verified by GETting >/http://my.remote.addr:8983/solr/collection2/schema/fields/) > >How to prevent this behavior, since my collections have *different kind of >datas*, and may have the same field names but not the same types? > >Thanks, >Ben > > > >-- >View this message in context: >http://lucene.472066.n3.nabble.com/Solrcloud-1-server-1-configset-multiple >-collections-multiple-schemas-tp4243584.html >Sent from the Solr - User mailing list archive at Nabble.com.