Re: SolrCloud multiple collections each with unique schema via SolrJ?

2016-05-17 Thread Boman
Got it! I now use uploadConfig to load the default config for each new
collection I create, and then modify the schema. Thanks!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-multiple-collections-each-with-unique-schema-via-SolrJ-tp4277397p4277406.html
Sent from the Solr - User mailing list archive at Nabble.com.


SolrCloud multiple collections each with unique schema via SolrJ?

2016-05-17 Thread Boman
I load the defaul config using scripts/cloud-scripts/zkcli.sh -cmd upconfig
after which collections are created programmatically and the schema modified
as per each collection's requirements.

I now notice that it is the SAME "default" original schema that holds ALL
the modifications (new fields). What I really want is that during collection
creation time (using SolrJ) as follows: 

CollectionAdminRequest.Create createRequest = new
CollectionAdminRequest.Create();
createRequest.setConfigName("default-config");

the new collection would "inherit" a copy of the default schema, and
following any updates to that schema, it should remain Collection-specific.

Any suggestions on how to achieve this programmatically? Thanks.

--Boman.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-multiple-collections-each-with-unique-schema-via-SolrJ-tp4277397.html
Sent from the Solr - User mailing list archive at Nabble.com.


NumberFormatException when inserting String into field of type string

2016-05-16 Thread Boman
Something's not right.
org.apache.solr.client.solrj.impl.CloudSolrClient$RouteException: Error from
server at http://10.204.10.19:8983/solr/00D61007927_shard1_replica2:
java.lang.NumberFormatException: For input string: "A1"
at
org.apache.solr.client.solrj.impl.CloudSolrClient.directUpdate(CloudSolrClient.java:632)
at
org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:981)
at
org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:870)
at
org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:806)
at 
org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:173)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:138)
at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:152)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/NumberFormatException-when-inserting-String-into-field-of-type-string-tp4277020.html
Sent from the Solr - User mailing list archive at Nabble.com.


getZkStateReader() returning NULL

2016-05-04 Thread Boman
I am attempting to check for existence of a collection prior to creating a
new one with that name, using Solrj:

System.out.println("Checking for existence of collection...");
ZkStateReader zkStateReader = this.server.getZkStateReader(); 
zkStateReader.updateClusterState();

this.server was created using:

   this.server = new CloudSolrClient(this.ZK_HOST);

The call: this.server.getZkStateReader() consistently returns a NULL.

Any help would be appreciated. Thanks.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/getZkStateReader-returning-NULL-tp4274663.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Making managed schema unmutable correctly?

2016-04-22 Thread Boman
Solved it - had to make sure default requestHander was configured for
spellcheck.





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Making-managed-schema-unmutable-correctly-tp4264051p4272235.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Making managed schema unmutable correctly?

2016-04-21 Thread Boman


From: "Boman [via Lucene]" 
<ml-node+s472066n4272073...@n3.nabble.com<mailto:ml-node+s472066n4272073...@n3.nabble.com>>
Date: Thursday, April 21, 2016 at 9:52 PM
To: Boman Irani <bir...@apttus.com<mailto:bir...@apttus.com>>
Subject: Re: Making managed schema unmutable correctly?

Thanks @Erick. You are right. That collection is not using a managed-schema.

Works now!


If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Making-managed-schema-unmutable-correctly-tp4264051p4272073.html
To unsubscribe from Making managed schema unmutable correctly?, click 
here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4264051=YmlyYW5pQGFwdHR1cy5jb218NDI2NDA1MXwxNzEwODg1NjQ1>.
NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Making-managed-schema-unmutable-correctly-tp4264051p4272074.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Making managed schema unmutable correctly?

2016-04-21 Thread Boman
Thanks @Erick. You are right. That collection is not using a managed-schema.

Works now!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Making-managed-schema-unmutable-correctly-tp4264051p4272073.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Making managed schema unmutable correctly?

2016-04-21 Thread Boman
Where do I find the shema.xml to hand edit? I can't find it on my node
running ZK.

I'm not sure what's happening, but when I try to add a field to the schema
for one of the collections (I am running in SolrCloud mode), I get:

curl -X POST -H 'Content-type:application/json' --data-binary '{ "add-field"
: { "name":"newtestfield__c", "type":"string", "stored":true}}'
http://localhost:8983/solr/00D6100HHnj/schema
{
  "responseHeader":{
"status":0,
"QTime":2},
  "errors":[{"errorMessages":"schema is not editable"}]}

Thanks.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Making-managed-schema-unmutable-correctly-tp4264051p4271963.html
Sent from the Solr - User mailing list archive at Nabble.com.