You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2016/02/18 18:20:14 UTC
lucene-solr git commit: tests: additional prefix facet tests
Repository: lucene-solr
Updated Branches:
refs/heads/master d8afc3876 -> 091889cf7
tests: additional prefix facet tests
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/091889cf
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/091889cf
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/091889cf
Branch: refs/heads/master
Commit: 091889cf79e15909963b6fad6c0a5394a34764bc
Parents: d8afc38
Author: yonik <yo...@apache.org>
Authored: Thu Feb 18 12:19:26 2016 -0500
Committer: yonik <yo...@apache.org>
Committed: Thu Feb 18 12:19:41 2016 -0500
----------------------------------------------------------------------
.../org/apache/solr/search/facet/TestJsonFacets.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/091889cf/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java
----------------------------------------------------------------------
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 9982d72..ffe1e3e 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
//