Skip to content

Commit

Permalink
Fixed ES query
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Ivanov committed Feb 14, 2022
1 parent 1891038 commit c9df964
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.iponweb.disthene.dumper</groupId>
<artifactId>disthene-dumper</artifactId>
<packaging>jar</packaging>
<version>2.0.0</version>
<version>2.0.1</version>
<name>disthene-dumper</name>
<url>http://maven.apache.org</url>

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/iponweb/disthene/dumper/Dumper.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void dumpTenant(File folder, final String tenant) throws IOException, In

CountRequest countRequest = new CountRequest(INDEX_NAME)
.query(QueryBuilders.boolQuery()
.must(QueryBuilders.termQuery("tenant", tenant))
.must(QueryBuilders.termQuery("tenant.keyword", tenant))
.must(QueryBuilders.termQuery("leaf", true)));

CountResponse countResponse = client.count(countRequest, RequestOptions.DEFAULT);
Expand All @@ -130,7 +130,7 @@ private void dumpTenant(File folder, final String tenant) throws IOException, In
.size(10_000)
.query(
QueryBuilders.boolQuery()
.must(QueryBuilders.termQuery("tenant", tenant))
.must(QueryBuilders.termQuery("tenant.keyword", tenant))
.must(QueryBuilders.termQuery("leaf", true))
);

Expand Down

0 comments on commit c9df964

Please sign in to comment.