Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Upgrade Noggit and allow flexible JSON input SOLR-6445

Noble Paul533477efa586
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index 561eadc1796..4282030114e 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -211,7 +211,7 @@ org.mortbay.jetty.version = 6.1.26
/org.mortbay.jetty/jetty = ${org.mortbay.jetty.version}
/org.mortbay.jetty/jetty-util = ${org.mortbay.jetty.version}
-/org.noggit/noggit = 0.5
+/org.noggit/noggit = 0.6
/org.objenesis/objenesis = 1.2
org.ow2.asm.version = 4.1
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a9e3dcc6fe5..dd9b7851fc9 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -108,6 +108,7 @@ Carrot2 3.9.0
Velocity 1.7 and Velocity Tools 2.0
Apache UIMA 2.3.1
Apache ZooKeeper 3.4.6
+Noggit 0.6
Detailed Change List
----------------------
@@ -154,6 +155,9 @@ Other Changes
* LUCENE-5901: Replaced all occurences of LUCENE_CURRENT with LATEST for luceneMatchVersion.
(Ryan Ernst)
+* SOLR-6445: Upgrade Noggit to verion 0.6 to support more flexible JSON input (Noble Paul , Yonik Seeley)
+
+
================== 4.10.0 =================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
diff --git a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
index ab3f0318556..7e61537f25b 100644
--- a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
@@ -281,7 +281,32 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
BufferingRequestProcessor p = new BufferingRequestProcessor(null);
JsonLoader loader = new JsonLoader();
loader.load(req, rsp, new ContentStreamBase.StringStream(doc), p);
-
+ assertEquals( 2, p.addCommands.size() );
+ doc = "\n" +
+ "\n" +
+ "{bool: true,\n" +
+ " f0: \"v0\",\n" +
+ " f2: {\n" +
+ " \t \"boost\": 2.3,\n" +
+ " \t \"value\": \"test\"\n" +
+ " \t },\n" +
+ "array: [ \"aaa\", \"bbb\" ],\n" +
+ "boosted: {\n" +
+ " \t \"boost\": 6.7,\n" +
+ " \t \"value\": [ \"aaa\", \"bbb\" ]\n" +
+ " \t }\n" +
+ " }\n" +
+ "\n" +
+ "\n" +
+ " {f1: \"v1\",\n" +
+ " f1: \"v2\",\n" +
+ " f2: null\n" +
+ " }\n";
+ req = req("json.command","false");
+ rsp = new SolrQueryResponse();
+ p = new BufferingRequestProcessor(null);
+ loader = new JsonLoader();
+ loader.load(req, rsp, new ContentStreamBase.StringStream(doc), p);
assertEquals( 2, p.addCommands.size() );