diff --git a/pom.xml b/pom.xml index 473b3bcf..f77af9ea 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ net.iponweb.disthene.reader disthene-reader jar - 2.0.12 + 2.0.13 disthene-reader https://maven.apache.org diff --git a/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java b/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java index d385a8ad..8112919b 100644 --- a/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java +++ b/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java @@ -61,7 +61,7 @@ private List getPathsFromRegExs(String tenant, List regExs, bool String regEx = Joiner.on("|").skipNulls().join(regExs); BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery() - .must(QueryBuilders.regexpQuery("path", regEx)) + .must(QueryBuilders.regexpQuery("path.keyword", regEx)) .filter(QueryBuilders.termQuery("tenant.keyword", tenant)); if (leaf) queryBuilder.filter(QueryBuilders.termQuery("leaf", true)); @@ -141,7 +141,7 @@ public String getPathsAsJsonArray(String tenant, String wildcard) throws TooMuch } BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery() - .must(QueryBuilders.regexpQuery("path", regEx)) + .must(QueryBuilders.regexpQuery("path.keyword", regEx)) .filter(QueryBuilders.termQuery("tenant.keyword", tenant)); SearchSourceBuilder sourceBuilder = new SearchSourceBuilder() @@ -202,7 +202,7 @@ public String getPathsWithStats(String tenant, String wildcard) throws TooMuchDa CountRequest countRequest = new CountRequest(indexConfiguration.getIndex()) .query(QueryBuilders.boolQuery() - .must(QueryBuilders.regexpQuery("path", path + "\\..*")) + .must(QueryBuilders.regexpQuery("path.keyword", path + "\\..*")) .must(QueryBuilders.termQuery("tenant.keyword", tenant)) .must(QueryBuilders.termQuery("leaf", true)));