fix(dataset profiles): compatibility with older indices. (#3242)

This commit is contained in:
rslanka 2021-09-15 14:30:39 -07:00 committed by GitHub
parent 9be6d2b580
commit f665ffc6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ public class ElasticSearchTimeseriesAspectService implements TimeseriesAspectSer
final BoolQueryBuilder filterQueryBuilder = ESUtils.buildFilterQuery(null); final BoolQueryBuilder filterQueryBuilder = ESUtils.buildFilterQuery(null);
filterQueryBuilder.must(QueryBuilders.matchQuery("urn", urn.toString())); filterQueryBuilder.must(QueryBuilders.matchQuery("urn", urn.toString()));
// NOTE: We are interested only in the un-exploded rows as only they carry the `event` payload. // NOTE: We are interested only in the un-exploded rows as only they carry the `event` payload.
filterQueryBuilder.must(QueryBuilders.termQuery(MappingsBuilder.IS_EXPLODED_FIELD, false)); filterQueryBuilder.mustNot(QueryBuilders.termQuery(MappingsBuilder.IS_EXPLODED_FIELD, true));
if (startTimeMillis != null) { if (startTimeMillis != null) {
Criterion startTimeCriterion = new Criterion().setField(TIMESTAMP_FIELD) Criterion startTimeCriterion = new Criterion().setField(TIMESTAMP_FIELD)
.setCondition(Condition.GREATER_THAN_OR_EQUAL_TO) .setCondition(Condition.GREATER_THAN_OR_EQUAL_TO)