|
@@ -106,9 +106,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
}, boxplot -> {
|
|
|
assertEquals(2, boxplot.getMin(), 0);
|
|
|
assertEquals(10, boxplot.getMax(), 0);
|
|
|
- assertEquals(2, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(2.25, boxplot.getQ1(), 0);
|
|
|
assertEquals(3.5, boxplot.getQ2(), 0);
|
|
|
- assertEquals(5, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(4.75, boxplot.getQ3(), 0);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -123,9 +123,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
}, boxplot -> {
|
|
|
assertEquals(2, boxplot.getMin(), 0);
|
|
|
assertEquals(10, boxplot.getMax(), 0);
|
|
|
- assertEquals(2, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(2.25, boxplot.getQ1(), 0);
|
|
|
assertEquals(3.5, boxplot.getQ2(), 0);
|
|
|
- assertEquals(5, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(4.75, boxplot.getQ3(), 0);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -141,9 +141,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
}, boxplot -> {
|
|
|
assertEquals(2, boxplot.getMin(), 0);
|
|
|
assertEquals(10, boxplot.getMax(), 0);
|
|
|
- assertEquals(2, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(2.25, boxplot.getQ1(), 0);
|
|
|
assertEquals(3.5, boxplot.getQ2(), 0);
|
|
|
- assertEquals(5, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(4.75, boxplot.getQ3(), 0);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -159,9 +159,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
}, boxplot -> {
|
|
|
assertEquals(2, boxplot.getMin(), 0);
|
|
|
assertEquals(10, boxplot.getMax(), 0);
|
|
|
- assertEquals(2, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(2.25, boxplot.getQ1(), 0);
|
|
|
assertEquals(3.5, boxplot.getQ2(), 0);
|
|
|
- assertEquals(5, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(4.75, boxplot.getQ3(), 0);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -274,9 +274,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
InternalBoxplot boxplot = (InternalBoxplot) histo.getBuckets().get(0).getAggregations().asMap().get("boxplot");
|
|
|
assertEquals(1, boxplot.getMin(), 0);
|
|
|
assertEquals(3, boxplot.getMax(), 0);
|
|
|
- assertEquals(1, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(1.5, boxplot.getQ1(), 0);
|
|
|
assertEquals(2, boxplot.getQ2(), 0);
|
|
|
- assertEquals(3, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(2.5, boxplot.getQ3(), 0);
|
|
|
|
|
|
assertNotNull(histo.getBuckets().get(1).getAggregations().asMap().get("boxplot"));
|
|
|
boxplot = (InternalBoxplot) histo.getBuckets().get(1).getAggregations().asMap().get("boxplot");
|
|
@@ -290,9 +290,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
boxplot = (InternalBoxplot) histo.getBuckets().get(2).getAggregations().asMap().get("boxplot");
|
|
|
assertEquals(21, boxplot.getMin(), 0);
|
|
|
assertEquals(23, boxplot.getMax(), 0);
|
|
|
- assertEquals(21, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(21.5, boxplot.getQ1(), 0);
|
|
|
assertEquals(22, boxplot.getQ2(), 0);
|
|
|
- assertEquals(23, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(22.5, boxplot.getQ3(), 0);
|
|
|
}, new AggTestConfig(histogram, fieldType));
|
|
|
}
|
|
|
|
|
@@ -310,14 +310,14 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
}, (Consumer<InternalBoxplot>) boxplot -> {
|
|
|
assertEquals(1, boxplot.getMin(), 0);
|
|
|
assertEquals(5, boxplot.getMax(), 0);
|
|
|
- assertEquals(1.75, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(2, boxplot.getQ1(), 0);
|
|
|
assertEquals(3, boxplot.getQ2(), 0);
|
|
|
- assertEquals(4.25, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(4, boxplot.getQ3(), 0);
|
|
|
assertEquals("0001.0", boxplot.getMinAsString());
|
|
|
assertEquals("0005.0", boxplot.getMaxAsString());
|
|
|
- assertEquals("0001.8", boxplot.getQ1AsString());
|
|
|
+ assertEquals("0002.0", boxplot.getQ1AsString());
|
|
|
assertEquals("0003.0", boxplot.getQ2AsString());
|
|
|
- assertEquals("0004.2", boxplot.getQ3AsString());
|
|
|
+ assertEquals("0004.0", boxplot.getQ3AsString());
|
|
|
}, new AggTestConfig(aggregationBuilder, fieldType));
|
|
|
}
|
|
|
|
|
@@ -359,9 +359,9 @@ public class BoxplotAggregatorTests extends AggregatorTestCase {
|
|
|
}, (Consumer<InternalBoxplot>) boxplot -> {
|
|
|
assertEquals(2, boxplot.getMin(), 0);
|
|
|
assertEquals(8, boxplot.getMax(), 0);
|
|
|
- assertEquals(2, boxplot.getQ1(), 0);
|
|
|
+ assertEquals(3.5, boxplot.getQ1(), 0);
|
|
|
assertEquals(5, boxplot.getQ2(), 0);
|
|
|
- assertEquals(8, boxplot.getQ3(), 0);
|
|
|
+ assertEquals(6.5, boxplot.getQ3(), 0);
|
|
|
}, new AggTestConfig(aggregationBuilder, fieldType));
|
|
|
}
|
|
|
|