SOLR-4842: merge an additional test case from branch_4x

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1484889 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2013-05-21 17:44:34 +00:00
parent 850edd0251
commit 6a9fc2aa55
1 changed files with 18 additions and 0 deletions

View File

@ -592,6 +592,24 @@ public class TestFaceting extends SolrTestCaseJ4 {
,"//lst[@name='foo']/int[@name='Tool'][.='2']"
);
final String foo_range_facet = "{!key=foo facet.range.gap=2}val_i";
final String val_range_facet = "val_i";
for (boolean toggle : new boolean[] { true, false }) {
assertQ("local gap param mixed w/raw range faceting: " + toggle,
req("q", "*:*"
,"facet", "true"
,"rows", "0"
,"facet.range.start", "0"
,"facet.range.end", "10"
,"facet.range.gap", "1"
,"facet.range", (toggle ? foo_range_facet : val_range_facet)
,"facet.range", (toggle ? val_range_facet : foo_range_facet)
)
,"*[count(//lst[@name='val_i']/lst[@name='counts']/int)=10]"
,"*[count(//lst[@name='foo']/lst[@name='counts']/int)=5]"
);
}
clearIndex();
assertU(commit());
}