From 091889cf79e15909963b6fad6c0a5394a34764bc Mon Sep 17 00:00:00 2001 From: yonik Date: Thu, 18 Feb 2016 12:19:26 -0500 Subject: [PATCH] tests: additional prefix facet tests --- .../apache/solr/search/facet/TestJsonFacets.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java index 9982d724897..ffe1e3e4389 100644 --- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java +++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java @@ -632,6 +632,21 @@ public class TestJsonFacets extends SolrTestCaseHS { "'f1':{ 'buckets':[]} } " ); + // test prefix on where field + client.testJQ(params(p, "q", "*:*" + , "json.facet", "{" + + " f1:{${terms} type:terms, field:${where_s}, prefix:N }" + + ",f2:{${terms} type:terms, field:${where_s}, prefix:NY }" + + ",f3:{${terms} type:terms, field:${where_s}, prefix:NJ }" + + "}" + ) + , "facets=={ 'count':6 " + + ",f1:{ 'buckets':[ {val:NJ,count:3}, {val:NY,count:2} ]}" + + ",f2:{ 'buckets':[ {val:NY,count:2} ]}" + + ",f3:{ 'buckets':[ {val:NJ,count:3} ]}" + + " } " + ); + // // missing //