Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #890 from palak-egov/patch-2
Browse files Browse the repository at this point in the history
Update FuzzySearchQueryBuilder.java
  • Loading branch information
debasishchakraborty-egovt authored Aug 8, 2024
2 parents 3915763 + f9184ff commit 8af8e68
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public String getFuzzySearchQuery(EmployeeSearchCriteria criteria, List<String>
}

ArrayNode tenantIdArray = mapper.createArrayNode();
tenantIdArray.add("pb");
tenantIdArray.add(criteria.getTenantId());
ObjectNode tenantIdFilter = mapper.createObjectNode();
tenantIdFilter.putPOJO("terms", mapper.createObjectNode().putPOJO("Data.tenantId.keyword", tenantIdArray));
fuzzyClauses.add(tenantIdFilter);
Expand All @@ -89,7 +89,7 @@ public String getFuzzySearchQuery(EmployeeSearchCriteria criteria, List<String>
roleArray.add(roleNode);
}
ObjectNode rolesBoolNode = mapper.createObjectNode();
rolesBoolNode.putPOJO("bool", mapper.createObjectNode().putPOJO("must", roleArray));
rolesBoolNode.putPOJO("bool", mapper.createObjectNode().putPOJO("should", roleArray));
fuzzyClauses.add(rolesBoolNode);

ObjectNode boolQuery = mapper.createObjectNode();
Expand Down

0 comments on commit 8af8e68

Please sign in to comment.