Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 05E4ADC7F for ; Thu, 15 Nov 2012 11:58:20 +0000 (UTC) Received: (qmail 75462 invoked by uid 500); 15 Nov 2012 11:58:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 74993 invoked by uid 500); 15 Nov 2012 11:58:13 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 74956 invoked by uid 99); 15 Nov 2012 11:58:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2012 11:58:12 +0000 Date: Thu, 15 Nov 2012 11:58:12 +0000 (UTC) From: "Luis Cappa Banda (JIRA)" To: dev@lucene.apache.org Message-ID: <315836691.118771.1352980692142.JavaMail.jiratomcat@arcas> Subject: =?utf-8?Q?[jira]_[Created]_(SOLR-4080)_SolrJ:_CloudSolrServer_atomic_u?= =?utf-8?Q?pdates_doesn=C2=B4t_work_with_Lists?= =?utf-8?Q?/Arrays_(Objects,_in_general).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Luis Cappa Banda created SOLR-4080: -------------------------------------- Summary: SolrJ: CloudSolrServer atomic updates doesn=C2=B4t wo= rk 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=3D1. solr-solrj artifact version 4.0.0 is used to execute atom= ic update operations. Reporter: Luis Cappa Banda Atomic updates with a CloudServer object instance doesn=C2=B4t work properl= y.=20 - Code snippet: // CloudSolrSever instance. LBHttpSolrServer lbSolrServer =3D new LBHttpSolrServer(solrEndpoints); CloudSolrServer cloudSolrServer =3D new CloudSolrServer(zookeeperEndpoints,= lbSolrServer); // SolrInputDocument to update:=20 SolrInputDocument do =3D ne SolrInputDocument(); doc.addField("id", "myId"); Map> operation =3D new HashMap>()= ; operation.put("set", [[a list of String elements]]); // I want a set opera= tion to override field values. doc.addField("fieldName", operation); // Atomic update operation. cloudSolrServer.add(doc);=20 - Result: doc: { id: "myId", fieldName: [ "{set=3Dvalues}" ], ... } - Changing map from snippet like Map operation =3D new HashMap() instead of= Map> operation =3D new HashMap>(= ) 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/Obj= ect 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 administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org