Upgrade Noggit and allow flexible JSON input SOLR-6445

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1621934 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2014-09-02 07:04:51 +00:00
parent 89658f13cc
commit 533477efa5
3 changed files with 31 additions and 2 deletions

View File

@ -211,7 +211,7 @@ org.mortbay.jetty.version = 6.1.26
/org.mortbay.jetty/jetty = ${org.mortbay.jetty.version} /org.mortbay.jetty/jetty = ${org.mortbay.jetty.version}
/org.mortbay.jetty/jetty-util = ${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.objenesis/objenesis = 1.2
org.ow2.asm.version = 4.1 org.ow2.asm.version = 4.1

View File

@ -108,6 +108,7 @@ Carrot2 3.9.0
Velocity 1.7 and Velocity Tools 2.0 Velocity 1.7 and Velocity Tools 2.0
Apache UIMA 2.3.1 Apache UIMA 2.3.1
Apache ZooKeeper 3.4.6 Apache ZooKeeper 3.4.6
Noggit 0.6
Detailed Change List Detailed Change List
---------------------- ----------------------
@ -154,6 +155,9 @@ Other Changes
* LUCENE-5901: Replaced all occurences of LUCENE_CURRENT with LATEST for luceneMatchVersion. * LUCENE-5901: Replaced all occurences of LUCENE_CURRENT with LATEST for luceneMatchVersion.
(Ryan Ernst) (Ryan Ernst)
* SOLR-6445: Upgrade Noggit to verion 0.6 to support more flexible JSON input (Noble Paul , Yonik Seeley)
================== 4.10.0 ================= ================== 4.10.0 =================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

View File

@ -281,7 +281,32 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {
BufferingRequestProcessor p = new BufferingRequestProcessor(null); BufferingRequestProcessor p = new BufferingRequestProcessor(null);
JsonLoader loader = new JsonLoader(); JsonLoader loader = new JsonLoader();
loader.load(req, rsp, new ContentStreamBase.StringStream(doc), p); 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() ); assertEquals( 2, p.addCommands.size() );