File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
main/java/org/nlpcn/es4sql/query/maker
test/java/org/nlpcn/es4sql Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public AggregationBuilder<?> makeGroupAgg(Field field) throws SqlParseException
52
52
Map <String , Object > paramsAsMap = methodField .getParamsAsMap ();
53
53
Where where = (Where ) paramsAsMap .get ("where" );
54
54
return AggregationBuilders .filter (paramsAsMap .get ("alias" ).toString ()).
55
- filter (FilterMaker .explan (where ));
55
+ filter (QueryMaker .explan (where ));
56
56
}
57
57
return makeRangeGroup (methodField );
58
58
} else {
Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ public void groupByTestWithFilter() throws Exception {
441
441
Terms gender = filter .getAggregations ().get ("gender" );
442
442
443
443
for (Terms .Bucket bucket : gender .getBuckets ()) {
444
- String key = bucket .getKey ();
444
+ String key = bucket .getKey (). toString () ;
445
445
long count = ((ValueCount ) bucket .getAggregations ().get ("COUNT(*)" )).getValue ();
446
446
if (key .equalsIgnoreCase ("m" )) {
447
447
Assert .assertEquals (507 , count );
@@ -461,7 +461,7 @@ public void groupByOnNestedFieldWithFilterTest() throws Exception {
461
461
Terms infos = filter .getAggregations ().get ("message.info" );
462
462
Assert .assertEquals (1 ,infos .getBuckets ().size ());
463
463
for (Terms .Bucket bucket : infos .getBuckets ()) {
464
- String key = bucket .getKey ();
464
+ String key = bucket .getKey (). toString () ;
465
465
long count = ((ValueCount ) bucket .getAggregations ().get ("COUNT(*)" )).getValue ();
466
466
if (key .equalsIgnoreCase ("a" )) {
467
467
Assert .assertEquals (2 , count );
Original file line number Diff line number Diff line change 42
42
})
43
43
public class MainTestSuite {
44
44
45
+
45
46
private static TransportClient client ;
46
47
private static SearchDao searchDao ;
47
48
You can’t perform that action at this time.
0 commit comments