[jira] [Assigned] (SOLR-4080) SolrJ: CloudSolrServer atomic updates doesn´t work with Lists/Arrays (Objects, in general).

2012-12-07 Thread Shalin Shekhar Mangar (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-4080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar reassigned SOLR-4080:
---

Assignee: Shalin Shekhar Mangar  (was: Yonik Seeley)

 SolrJ: CloudSolrServer atomic updates doesn´t work with Lists/Arrays 
 (Objects, in general).
 ---

 Key: SOLR-4080
 URL: https://issues.apache.org/jira/browse/SOLR-4080
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0
 Environment: Solr 4.0 with SolrCloud deployed with two SolrServers 
 with shards=1. solr-solrj artifact version 4.0.0 is used to execute atomic 
 update operations.
Reporter: Luis Cappa Banda
Assignee: Shalin Shekhar Mangar
 Fix For: 4.1


 Atomic updates with a CloudSolrServer object instance doesn´t work properly. 
 - Code snippet:
 // CloudSolrSever instance.
 LBHttpSolrServer lbSolrServer = new LBHttpSolrServer(solrEndpoints);
 CloudSolrServer cloudSolrServer = new CloudSolrServer(zookeeperEndpoints, 
 lbSolrServer);
 // SolrInputDocument to update: 
 SolrInputDocument do = ne SolrInputDocument();
 doc.addField(id, myId);
 MapString, ListString operation = new HashMapString, ListString();
 operation.put(set, [[a list of String elements]]);  // I want a set 
 operation to override field values.
 doc.addField(fieldName, operation);
 // Atomic update operation.
 cloudSolrServer.add(doc); 
 - Result:
 doc: {
 id: myId,
 fieldName: [ {set=values}
 ],
 ...
 }
 - Changing map from snippet like Map operation = new HashMap() instead of 
 MapString, ListString operation = new HashMapString, ListString() 
 obtains the following result after the atomic update:
 doc: {
 id: myId,
 fieldName: [[Value1, Value2]
 ],
 ...
 }
 - Also, the old value is never erased, and instead of a set operation an 
 add operation happens.
 CONCLUSION: during an atomic update with CloudSolrServer the 
 List/Array/Object value passed is being processed with just a toString() 
 method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Assigned] (SOLR-4080) SolrJ: CloudSolrServer atomic updates doesn´t work with Lists/Arrays (Objects, in general).

2012-11-20 Thread Yonik Seeley (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-4080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yonik Seeley reassigned SOLR-4080:
--

Assignee: Yonik Seeley

 SolrJ: CloudSolrServer atomic updates doesn´t work with Lists/Arrays 
 (Objects, in general).
 ---

 Key: SOLR-4080
 URL: https://issues.apache.org/jira/browse/SOLR-4080
 Project: Solr
  Issue Type: Bug
  Components: SolrCloud
Affects Versions: 4.0
 Environment: Solr 4.0 with SolrCloud deployed with two SolrServers 
 with shards=1. solr-solrj artifact version 4.0.0 is used to execute atomic 
 update operations.
Reporter: Luis Cappa Banda
Assignee: Yonik Seeley
 Fix For: 4.1


 Atomic updates with a CloudSolrServer object instance doesn´t work properly. 
 - Code snippet:
 // CloudSolrSever instance.
 LBHttpSolrServer lbSolrServer = new LBHttpSolrServer(solrEndpoints);
 CloudSolrServer cloudSolrServer = new CloudSolrServer(zookeeperEndpoints, 
 lbSolrServer);
 // SolrInputDocument to update: 
 SolrInputDocument do = ne SolrInputDocument();
 doc.addField(id, myId);
 MapString, ListString operation = new HashMapString, ListString();
 operation.put(set, [[a list of String elements]]);  // I want a set 
 operation to override field values.
 doc.addField(fieldName, operation);
 // Atomic update operation.
 cloudSolrServer.add(doc); 
 - Result:
 doc: {
 id: myId,
 fieldName: [ {set=values}
 ],
 ...
 }
 - Changing map from snippet like Map operation = new HashMap() instead of 
 MapString, ListString operation = new HashMapString, ListString() 
 obtains the following result after the atomic update:
 doc: {
 id: myId,
 fieldName: [[Value1, Value2]
 ],
 ...
 }
 - Also, the old value is never erased, and instead of a set operation an 
 add operation happens.
 CONCLUSION: during an atomic update with CloudSolrServer the 
 List/Array/Object value passed is being processed with just a toString() 
 method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org