From 68f9994ae842debf2924a818d8e774a530130923 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Sat, 5 Jan 2013 01:29:57 +0000 Subject: [PATCH] SOLR-4121: add test for fix git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1429181 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/search/TestSolrQueryParser.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java index cef61461783..b7b9fe11d81 100644 --- a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java +++ b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java @@ -40,6 +40,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 { assertU(adoc("id","10", "qqq_s","X")); assertU(adoc("id","11", "www_s","X")); assertU(adoc("id","12", "eee_s","X")); + assertU(adoc("id","13", "eee_s","'balance'")); assertU(commit()); } @@ -82,8 +83,14 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 { assertJQ(req("q","qaz {!join from=www_s to=eee_s}{!join from=qqq_s to=www_s}id:10" ) ,"/response/docs/[0]/id=='12'" ); - - } + @Test + public void testSolr4121() throws Exception { + // This query doesn't match anything, testing + // to make sure that SOLR-4121 is not a problem. + assertJQ(req("q","eee_s:'balance'", "indent","true") + ,"/response/numFound==1" + ); + } }