Yeah, it doesn’t look like there is no builder for equals. If you reply with the code you tried for using of, along with the expect and actual output, we can try to figure out what’s going wrong.

Hi Jeffrey, thank you for your reply!

I am trying to do something like:

private static final String EQUAL_CLAUSE = """ { "equals": { "path": "myFlag", "value": true } } """;
filterOperators.add(SearchOperator.of(Document.parse(EQUAL_CLAUSE))); CompoundSearchOperator compoundSearchOperator = SearchOperator.compound().filter(filterOperators); if (!mustOperators.isEmpty()) { compoundSearchOperator = compoundSearchOperator.must(mustOperators); } if (!shouldOperators.isEmpty()) { compoundSearchOperator = compoundSearchOperator.should(shouldOperators); } aggregates.add(Aggregates.search(compoundSearchOperator));

However, it would yield with no results for me.

It sounds like the Java driver part is working ok, but the query just doesn’t match. You might want to look in logs to confirm that the query is generated as you expect, and then check your data against the query, and re-read the docs, to see why you’re not getting results.

Jeff

5 months later

Hey, may I ask how do you fix the issue? What is wrong with the index configuration?
I am facing the same issue

Sorry, tbh, I cannot remember what I did…
I think maybe I initially did not configure to use lucene.standard as the Analyzer. Would you check that? Or did you turn on the dynamic mapping?

(Perhaps pasting your index mapping JSON here would be helpful to identify the cause)

2 years later

FWIW here is a link to the PR that was merged that will include the equals operator. There are more operators coming soon to the library.