SOLR-3037: When using binary format in solrj the codec screws up parameters

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1231564 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2012-01-14 19:09:52 +00:00
parent 046fd6682c
commit f090ac33b0
3 changed files with 9 additions and 2 deletions

View File

@ -294,6 +294,10 @@ Bug Fixes
* SOLR-1520: QueryElevationComponent now supports non-string ids (gsingers)
* SOLR-3037: When using binary format in solrj the codec screws up parameters
(Sami Siren via yonik)
Other Changes
----------------------

View File

@ -195,7 +195,9 @@ public class JavaBinUpdateRequestCodec {
NamedList nl = new NamedList();
while (it.hasNext()) {
String s = it.next();
nl.add(s, params.getParams(s));
for(String val: params.getParams(s)) {
nl.add(s, val);
}
}
return nl;
}

View File

@ -50,7 +50,7 @@ public class TestUpdateRequestCodec extends LuceneTestCase {
updateRequest.deleteById("id:5");
updateRequest.deleteByQuery("2*");
updateRequest.deleteByQuery("1*");
updateRequest.setParam("a", "b");
SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", 1);
doc.addField("desc", "one", 2.0f);
@ -106,6 +106,7 @@ public class TestUpdateRequestCodec extends LuceneTestCase {
Assert.assertEquals(updateUnmarshalled.getDeleteQuery().get(0) ,
updateRequest.getDeleteQuery().get(0));
assertEquals("b", updateUnmarshalled.getParams().get("a"));
}
@Test