use of org.sonar.server.es.searchrequest.TopAggregationDefinition.SimpleFieldFilterScope in project sonarqube by SonarSource.
the class IssueIndex method addCreatedAfterByProjectsFilter.
private static void addCreatedAfterByProjectsFilter(AllFilters allFilters, IssueQuery query) {
Map<String, PeriodStart> createdAfterByProjectUuids = query.createdAfterByProjectUuids();
BoolQueryBuilder boolQueryBuilder = boolQuery();
createdAfterByProjectUuids.forEach((projectOrProjectBranchUuid, createdAfterDate) -> boolQueryBuilder.should(boolQuery().filter(termQuery(FIELD_ISSUE_BRANCH_UUID, projectOrProjectBranchUuid)).filter(rangeQuery(FIELD_ISSUE_FUNC_CREATED_AT).from(BaseDoc.dateToEpochSeconds(createdAfterDate.date()), createdAfterDate.inclusive()))));
allFilters.addFilter("__created_after_by_project_uuids", new SimpleFieldFilterScope("createdAfterByProjectUuids"), boolQueryBuilder);
}
Aggregations