elasticsearch - FilteredQueryBuilder deprecated -


what difference between filteredquerybuilder , queryfilterbuilder both deprecated since 2.0 , alternative java code filteredquerybuilder

 filteredquerybuilder filteredquerybuilder = querybuilders.filteredquery(termsquerybuilder, null);   queryfilterbuilder queryfilterbuilder = filterbuilders.queryfilter(esquerybuilder); 

since queries , filters have been merged, constructs make no sense anymore.

filteredquerybuilder used create filtered query, i.e. scored query constrained set of filters. instead of using filteredquerybuilder, should use

  • a bool/filter created using querybuilders.boolquery().filter(...)
  • or bool/must_not created using querybuilders.boolquery().mustnot(...) if need negate filter

queryfilterbuilder used create query filter, i.e. non-scored query inside filtered context. instead of using queryfilterbuilder, should now

  • use bool/must query created using querybuilders.boolquery().must(...) if need , queries
  • or use bool/should created using querybuilders.boolquery().should(...) if need or queries

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -