BoolFilterBuilder langFacetFilter = FilterBuilders.boolFilter().must(FilterBuilders.queryFilter(query));
for (Map.Entry<String, FilterBuilder> filter : filters.entrySet()) {
- if (filter.getKey() != RuleNormalizer.RuleField.LANGUAGE.field()) {
+ if (!StringUtils.equals(filter.getKey(), RuleNormalizer.RuleField.LANGUAGE.field())) {
langFacetFilter.must(filter.getValue());
}
}
BoolFilterBuilder tagsFacetFilter = FilterBuilders.boolFilter().must(FilterBuilders.queryFilter(query));
for (Map.Entry<String, FilterBuilder> filter : filters.entrySet()) {
- if (filter.getKey() != RuleNormalizer.RuleField._TAGS.field()) {
+ if (!StringUtils.equals(filter.getKey(), RuleNormalizer.RuleField._TAGS.field())) {
tagsFacetFilter.must(filter.getValue());
}
}
BoolFilterBuilder repositoriesFacetFilter = FilterBuilders.boolFilter().must(FilterBuilders.queryFilter(query));
for (Map.Entry<String, FilterBuilder> filter : filters.entrySet()) {
- if (filter.getKey() != RuleNormalizer.RuleField.REPOSITORY.field()) {
+ if (!StringUtils.equals(filter.getKey(), RuleNormalizer.RuleField.REPOSITORY.field())) {
repositoriesFacetFilter.must(filter.getValue());
}
}