Can you please help me if the below code(es v0.9) can be replaced
BoolFilterBuilder filter = FilterBuilders.boolFilter().filterName("compositeFilter");
by the following (es v6)
BoolQueryBuilder query = QueryBuilders.boolQuery();
That might be ok.
You can remove
must() at the end BTW.
Ohh.. Then how do I differentiate/specify must, mustnot while using boolquery as filter ?
You can add a
bool within a
I'm missing something here. I don't completely understand.
The above snippet is what could be proper replacement.
I'm not getting how do we specify exact
must clauses. Can you help me with similar code line.
Why do you want to use
must when you can use
OK, So v6 is basically moving out of this must filter and then mustnot ?
My usecase is to use
mustNot in some cases
Your original example was without
must_not. But you can basically use
filter to filter (no scoring),
must_not to remove documents from the resultset, and
should if relevancy matters.
That helps. David..Will Use this way now. will keep you posted in case of any further issues.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.