Noble: Any commit related to a Jira should mention thta jira # -- but mentioning a Jira # by itself w/o any other info is not a helpful svn message.
We should always be including a short descriptive message explaining what/why we are making a change -- in every commit. if someone can't think of a short summary that adequately captures things, then the commit probably encompases too many things and should be done piece meal. : Date: Wed, 05 Nov 2014 15:41:09 -0000 : From: no...@apache.org : Reply-To: dev@lucene.apache.org : To: comm...@lucene.apache.org : Subject: svn commit: r1636900 - in /lucene/dev/trunk/solr/solrj/src: : java/org/apache/solr/common/util/JsonRecordReader.java : test/org/apache/solr/common/util/TestJsonRecordReader.java : : Author: noble : Date: Wed Nov 5 15:41:08 2014 : New Revision: 1636900 : : URL: http://svn.apache.org/r1636900 : Log: : SOLR-6706 : : Modified: : lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java : lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/TestJsonRecordReader.java : : Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java : URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java?rev=1636900&r1=1636899&r2=1636900&view=diff : ============================================================================== : --- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java (original) : +++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java Wed Nov 5 15:41:08 2014 : @@ -394,6 +394,7 @@ public class JsonRecordReader { : event = parser.nextEvent(); : if (event == STRING || : event == LONG || : + event == NUMBER || : event == BIGNUMBER || : event == BOOLEAN || : event == NULL) { : : Modified: lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/TestJsonRecordReader.java : URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/TestJsonRecordReader.java?rev=1636900&r1=1636899&r2=1636900&view=diff : ============================================================================== : --- lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/TestJsonRecordReader.java (original) : +++ lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/TestJsonRecordReader.java Wed Nov 5 15:41:08 2014 : @@ -180,7 +180,7 @@ public class TestJsonRecordReader exten : records = streamer.getAllRecords(new StringReader(json)); : assertEquals(2, records.size()); : for (Map<String, Object> record : records) { : - assertEquals(6,record.size()); : + assertEquals(6, record.size()); : assertTrue(record.containsKey("subject")); : assertTrue(record.containsKey("test")); : assertTrue(record.containsKey("marks")); : @@ -203,4 +203,24 @@ public class TestJsonRecordReader exten : : } : : + public void testNestedJsonWithFloats() throws Exception { : + : + String json = "{\n" + : + " \"a_string\" : \"abc\",\n" + : + " \"a_num\" : 2.0,\n" + : + " \"a\" : {\n" + : + " \"b\" : [\n" + : + " {\"id\":\"1\", \"title\" : \"test1\"},\n" + : + " {\"id\":\"2\", \"title\" : \"test2\"}\n" + : + " ]\n" + : + " }\n" + : + "}\n"; : + : + JsonRecordReader streamer; : + List<Map<String, Object>> records; : + : + streamer = JsonRecordReader.getInst("/a/b", Collections.singletonList("title_s:/a/b/title")); : + records = streamer.getAllRecords(new StringReader(json)); : + assertEquals(2, records.size()); : + } : } : : : -Hoss http://www.lucidworks.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org