Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 authored and peng-yongsheng committed Nov 29, 2018
1 parent 215eab7 commit 9c642d5
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ public MetadataQueryEsDAO(ElasticSearchClient client) {
@Override public int numOfConjectural(long startTimestamp, long endTimestamp, int srcLayer) throws IOException {
SearchSourceBuilder sourceBuilder = SearchSourceBuilder.searchSource();

BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
boolQueryBuilder.must().add(timeRangeQueryBuild(startTimestamp, endTimestamp));
boolQueryBuilder.must().add(QueryBuilders.termQuery(NetworkAddressInventory.SRC_LAYER, srcLayer));

sourceBuilder.query(boolQueryBuilder);
sourceBuilder.query(QueryBuilders.termQuery(NetworkAddressInventory.SRC_LAYER, srcLayer));
sourceBuilder.size(0);

SearchResponse response = getClient().search(NetworkAddressInventory.MODEL_NAME, sourceBuilder);
Expand Down

0 comments on commit 9c642d5

Please sign in to comment.