lucene4: fixed integration tests that got broken by switch from String to Text in Facet terms

This commit is contained in:
Igor Motov 2012-10-31 05:52:42 -04:00 committed by Shay Banon
parent edb4fe18e0
commit 6bbe37f876
3 changed files with 93 additions and 93 deletions

View File

@ -424,16 +424,16 @@ public class SimpleNestedTests extends AbstractNodesTests {
TermsStatsFacet termsStatsFacet = searchResponse.facets().facet("facet1");
assertThat(termsStatsFacet.entries().size(), equalTo(4));
assertThat(termsStatsFacet.entries().get(0).term(), equalTo("blue"));
assertThat(termsStatsFacet.entries().get(0).term().string(), equalTo("blue"));
assertThat(termsStatsFacet.entries().get(0).count(), equalTo(3l));
assertThat(termsStatsFacet.entries().get(0).total(), equalTo(8d));
assertThat(termsStatsFacet.entries().get(1).term(), equalTo("yellow"));
assertThat(termsStatsFacet.entries().get(1).term().string(), equalTo("yellow"));
assertThat(termsStatsFacet.entries().get(1).count(), equalTo(2l));
assertThat(termsStatsFacet.entries().get(1).total(), equalTo(13d));
assertThat(termsStatsFacet.entries().get(2).term(), equalTo("green"));
assertThat(termsStatsFacet.entries().get(2).term().string(), equalTo("green"));
assertThat(termsStatsFacet.entries().get(2).count(), equalTo(2l));
assertThat(termsStatsFacet.entries().get(2).total(), equalTo(14d));
assertThat(termsStatsFacet.entries().get(3).term(), equalTo("red"));
assertThat(termsStatsFacet.entries().get(3).term().string(), equalTo("red"));
assertThat(termsStatsFacet.entries().get(3).count(), equalTo(1l));
assertThat(termsStatsFacet.entries().get(3).total(), equalTo(12d));
@ -448,7 +448,7 @@ public class SimpleNestedTests extends AbstractNodesTests {
termsStatsFacet = searchResponse.facets().facet("facet1");
assertThat(termsStatsFacet.entries().size(), equalTo(1));
assertThat(termsStatsFacet.entries().get(0).term(), equalTo("blue"));
assertThat(termsStatsFacet.entries().get(0).term().string(), equalTo("blue"));
assertThat(termsStatsFacet.entries().get(0).count(), equalTo(3l));
assertThat(termsStatsFacet.entries().get(0).total(), equalTo(8d));
}

View File

@ -564,9 +564,9 @@ public class SimpleChildQuerySearchTests extends AbstractNodesTests {
assertThat(searchResponse.facets().facets().size(), equalTo(1));
TermsFacet termsFacet = searchResponse.facets().facet("facet1");
assertThat(termsFacet.entries().size(), equalTo(2));
assertThat(termsFacet.entries().get(0).term(), equalTo("red"));
assertThat(termsFacet.entries().get(0).term().string(), equalTo("red"));
assertThat(termsFacet.entries().get(0).count(), equalTo(2));
assertThat(termsFacet.entries().get(1).term(), equalTo("yellow"));
assertThat(termsFacet.entries().get(1).term().string(), equalTo("yellow"));
assertThat(termsFacet.entries().get(1).count(), equalTo(1));
}

View File

@ -134,9 +134,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
TermsFacet facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).term().string(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).count(), equalTo(1));
}
}
@ -174,9 +174,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
TermsFacet facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).term().string(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -189,9 +189,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).term().string(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("green"), equalTo("blue")));
assertThat(facet.entries().get(1).count(), equalTo(1));
}
}
@ -237,7 +237,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
TermsFacet facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
searchResponse = client.prepareSearch()
@ -253,7 +253,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
}
}
@ -296,9 +296,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
TermsFacet facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("test1"));
assertThat(facet.entries().get(0).term().string(), equalTo("test1"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), equalTo("test2"));
assertThat(facet.entries().get(1).term().string(), equalTo("test2"));
assertThat(facet.entries().get(1).count(), equalTo(1));
}
@ -460,13 +460,13 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet.getTotalCount(), equalTo(2l));
assertThat(facet.getOtherCount(), equalTo(0l));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
facet = searchResponse.facets().facet("facet2");
assertThat(facet.name(), equalTo("facet2"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(2));
// Numeric
@ -482,27 +482,27 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet, instanceOf(InternalLongTermsFacet.class));
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
facet = searchResponse.facets().facet("facet2");
assertThat(facet, instanceOf(InternalLongTermsFacet.class));
assertThat(facet.name(), equalTo("facet2"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("2000"));
assertThat(facet.entries().get(0).term().string(), equalTo("2000"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("1000"), equalTo("3000")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("1000"), equalTo("3000")));
assertThat(facet.entries().get(1).count(), equalTo(1));
assertThat(facet.entries().get(2).term(), anyOf(equalTo("1000"), equalTo("3000")));
assertThat(facet.entries().get(2).term().string(), anyOf(equalTo("1000"), equalTo("3000")));
assertThat(facet.entries().get(2).count(), equalTo(1));
facet = searchResponse.facets().facet("facet3");
assertThat(facet, instanceOf(InternalLongTermsFacet.class));
assertThat(facet.name(), equalTo("facet3"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("2000"));
assertThat(facet.entries().get(0).term().string(), equalTo("2000"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), equalTo("1000"));
assertThat(facet.entries().get(1).term().string(), equalTo("1000"));
assertThat(facet.entries().get(1).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -515,18 +515,18 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet, instanceOf(InternalDoubleTermsFacet.class));
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111.1"));
assertThat(facet.entries().get(0).term().string(), equalTo("111.1"));
assertThat(facet.entries().get(0).count(), equalTo(2));
facet = searchResponse.facets().facet("facet2");
assertThat(facet, instanceOf(InternalDoubleTermsFacet.class));
assertThat(facet.name(), equalTo("facet2"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("2000.1"));
assertThat(facet.entries().get(0).term().string(), equalTo("2000.1"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("1000.1"), equalTo("3000.1")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("1000.1"), equalTo("3000.1")));
assertThat(facet.entries().get(1).count(), equalTo(1));
assertThat(facet.entries().get(2).term(), anyOf(equalTo("1000.1"), equalTo("3000.1")));
assertThat(facet.entries().get(2).term().string(), anyOf(equalTo("1000.1"), equalTo("3000.1")));
assertThat(facet.entries().get(2).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -538,7 +538,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet, instanceOf(InternalByteTermsFacet.class));
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
searchResponse = client.prepareSearch()
@ -550,7 +550,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet, instanceOf(InternalIntTermsFacet.class));
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
searchResponse = client.prepareSearch()
@ -562,7 +562,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet, instanceOf(InternalShortTermsFacet.class));
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
// Test Facet Filter
@ -575,7 +575,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(1));
// now with global
@ -587,7 +587,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(1));
// Test Facet Filter (with a type)
@ -600,7 +600,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -611,11 +611,11 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(1).count(), equalTo(1));
assertThat(facet.entries().get(2).term(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(2).term().string(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(2).count(), equalTo(1));
// Bounded Size
@ -628,9 +628,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(1).count(), equalTo(1));
// Test Exclude
@ -643,9 +643,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(0).term().string(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("xxx"), equalTo("zzz")));
assertThat(facet.entries().get(1).count(), equalTo(1));
// Test Order
@ -658,11 +658,11 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(2));
assertThat(facet.entries().get(2).term(), equalTo("zzz"));
assertThat(facet.entries().get(2).term().string(), equalTo("zzz"));
assertThat(facet.entries().get(2).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -673,11 +673,11 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(2).term(), equalTo("xxx"));
assertThat(facet.entries().get(2).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(2).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("zzz"));
assertThat(facet.entries().get(0).term().string(), equalTo("zzz"));
assertThat(facet.entries().get(0).count(), equalTo(1));
// Script
@ -690,11 +690,11 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("xxxa"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxxa"));
assertThat(facet.entries().get(0).count(), equalTo(1));
assertThat(facet.entries().get(1).term(), equalTo("yyya"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyya"));
assertThat(facet.entries().get(1).count(), equalTo(2));
assertThat(facet.entries().get(2).term(), equalTo("zzza"));
assertThat(facet.entries().get(2).term().string(), equalTo("zzza"));
assertThat(facet.entries().get(2).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -705,9 +705,9 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), equalTo("zzz"));
assertThat(facet.entries().get(1).term().string(), equalTo("zzz"));
assertThat(facet.entries().get(1).count(), equalTo(1));
// Fields Facets
@ -720,13 +720,13 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(4));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("111"), equalTo("yyy")));
assertThat(facet.entries().get(0).term().string(), anyOf(equalTo("111"), equalTo("yyy")));
assertThat(facet.entries().get(0).count(), equalTo(2));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("111"), equalTo("yyy")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("111"), equalTo("yyy")));
assertThat(facet.entries().get(1).count(), equalTo(2));
assertThat(facet.entries().get(2).term(), anyOf(equalTo("zzz"), equalTo("xxx")));
assertThat(facet.entries().get(2).term().string(), anyOf(equalTo("zzz"), equalTo("xxx")));
assertThat(facet.entries().get(2).count(), equalTo(1));
assertThat(facet.entries().get(3).term(), anyOf(equalTo("zzz"), equalTo("xxx")));
assertThat(facet.entries().get(3).term().string(), anyOf(equalTo("zzz"), equalTo("xxx")));
assertThat(facet.entries().get(3).count(), equalTo(1));
searchResponse = client.prepareSearch()
@ -737,11 +737,11 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), anyOf(equalTo("xxx"), equalTo("yyy"), equalTo("zzz")));
assertThat(facet.entries().get(0).term().string(), anyOf(equalTo("xxx"), equalTo("yyy"), equalTo("zzz")));
assertThat(facet.entries().get(0).count(), equalTo(0));
assertThat(facet.entries().get(1).term(), anyOf(equalTo("xxx"), equalTo("yyy"), equalTo("zzz")));
assertThat(facet.entries().get(1).term().string(), anyOf(equalTo("xxx"), equalTo("yyy"), equalTo("zzz")));
assertThat(facet.entries().get(1).count(), equalTo(0));
assertThat(facet.entries().get(2).term(), anyOf(equalTo("xxx"), equalTo("yyy"), equalTo("zzz")));
assertThat(facet.entries().get(2).term().string(), anyOf(equalTo("xxx"), equalTo("yyy"), equalTo("zzz")));
assertThat(facet.entries().get(2).count(), equalTo(0));
// Script Field
@ -755,13 +755,13 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("facet1");
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(1));
assertThat(facet.entries().get(0).term(), equalTo("111"));
assertThat(facet.entries().get(0).term().string(), equalTo("111"));
assertThat(facet.entries().get(0).count(), equalTo(2));
facet = searchResponse.facets().facet("facet2");
assertThat(facet.name(), equalTo("facet2"));
assertThat(facet.entries().size(), equalTo(3));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(2));
}
}
@ -807,7 +807,7 @@ public class SimpleFacetsTests extends AbstractNodesTests {
assertThat(facet.name(), equalTo("facet1"));
assertThat(facet.entries().size(), equalTo(3));
for (int j = 0; j < 3; j++) {
assertThat(facet.entries().get(j).term(), anyOf(equalTo("foo"), equalTo("bar"), equalTo("baz")));
assertThat(facet.entries().get(j).term().string(), anyOf(equalTo("foo"), equalTo("bar"), equalTo("baz")));
assertThat(facet.entries().get(j).count(), equalTo(10));
}
}
@ -1602,13 +1602,13 @@ public class SimpleFacetsTests extends AbstractNodesTests {
TermsStatsFacet facet = searchResponse.facets().facet("stats1");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).totalCount(), equalTo(2l));
assertThat(facet.entries().get(0).min(), closeTo(100d, 0.00001d));
assertThat(facet.entries().get(0).max(), closeTo(200d, 0.00001d));
assertThat(facet.entries().get(0).total(), closeTo(300d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).totalCount(), equalTo(1l));
assertThat(facet.entries().get(1).min(), closeTo(500d, 0.00001d));
@ -1617,12 +1617,12 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("stats2");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).min(), closeTo(1d, 0.00001d));
assertThat(facet.entries().get(0).max(), closeTo(3d, 0.00001d));
assertThat(facet.entries().get(0).total(), closeTo(8d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).min(), closeTo(5d, 0.00001d));
assertThat(facet.entries().get(1).max(), closeTo(6d, 0.00001d));
@ -1630,100 +1630,100 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("stats3");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(300d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(500d, 0.00001d));
facet = searchResponse.facets().facet("stats4");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(8d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(11d, 0.00001d));
facet = searchResponse.facets().facet("stats5");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(1l));
assertThat(facet.entries().get(0).total(), closeTo(500d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("xxx"));
assertThat(facet.entries().get(1).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(1).count(), equalTo(2l));
assertThat(facet.entries().get(1).total(), closeTo(300d, 0.00001d));
facet = searchResponse.facets().facet("stats6");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(1l));
assertThat(facet.entries().get(0).total(), closeTo(11d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("xxx"));
assertThat(facet.entries().get(1).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(1).count(), equalTo(2l));
assertThat(facet.entries().get(1).total(), closeTo(8d, 0.00001d));
facet = searchResponse.facets().facet("stats7");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(300d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(500d, 0.00001d));
facet = searchResponse.facets().facet("stats8");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(8d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(11d, 0.00001d));
facet = searchResponse.facets().facet("stats9");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(300d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(500d, 0.00001d));
facet = searchResponse.facets().facet("stats10");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(8d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(11d, 0.00001d));
facet = searchResponse.facets().facet("stats11");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(1l));
assertThat(facet.entries().get(0).total(), closeTo(500d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("xxx"));
assertThat(facet.entries().get(1).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(1).count(), equalTo(2l));
assertThat(facet.entries().get(1).total(), closeTo(300d, 0.00001d));
facet = searchResponse.facets().facet("stats12");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("yyy"));
assertThat(facet.entries().get(0).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(0).count(), equalTo(1l));
assertThat(facet.entries().get(0).total(), closeTo(11d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("xxx"));
assertThat(facet.entries().get(1).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(1).count(), equalTo(2l));
assertThat(facet.entries().get(1).total(), closeTo(8d, 0.00001d));
facet = searchResponse.facets().facet("stats13");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("xxx"));
assertThat(facet.entries().get(0).term().string(), equalTo("xxx"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).total(), closeTo(600d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("yyy"));
assertThat(facet.entries().get(1).term().string(), equalTo("yyy"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).total(), closeTo(1000d, 0.00001d));
}
@ -1776,12 +1776,12 @@ public class SimpleFacetsTests extends AbstractNodesTests {
TermsStatsFacet facet = searchResponse.facets().facet("stats1");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("100"));
assertThat(facet.entries().get(0).term().string(), equalTo("100"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).min(), closeTo(100d, 0.00001d));
assertThat(facet.entries().get(0).max(), closeTo(200d, 0.00001d));
assertThat(facet.entries().get(0).total(), closeTo(300d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("200"));
assertThat(facet.entries().get(1).term().string(), equalTo("200"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).min(), closeTo(500d, 0.00001d));
assertThat(facet.entries().get(1).max(), closeTo(500d, 0.00001d));
@ -1789,12 +1789,12 @@ public class SimpleFacetsTests extends AbstractNodesTests {
facet = searchResponse.facets().facet("stats2");
assertThat(facet.entries().size(), equalTo(2));
assertThat(facet.entries().get(0).term(), equalTo("100.1"));
assertThat(facet.entries().get(0).term().string(), equalTo("100.1"));
assertThat(facet.entries().get(0).count(), equalTo(2l));
assertThat(facet.entries().get(0).min(), closeTo(100d, 0.00001d));
assertThat(facet.entries().get(0).max(), closeTo(200d, 0.00001d));
assertThat(facet.entries().get(0).total(), closeTo(300d, 0.00001d));
assertThat(facet.entries().get(1).term(), equalTo("200.2"));
assertThat(facet.entries().get(1).term().string(), equalTo("200.2"));
assertThat(facet.entries().get(1).count(), equalTo(1l));
assertThat(facet.entries().get(1).min(), closeTo(500d, 0.00001d));
assertThat(facet.entries().get(1).max(), closeTo(500d, 0.00001d));