Home > Back-end >  Java ES the problem of operation
Java ES the problem of operation

Time:11-09

When used in Java do ES composite query operation today suddenly found should and must take effect when used at the same time should not have bosses tell me what is it?

Code:

BoolBuilder. Should (QueryBuilders. TermQuery (" corpName ", "hippocampus"));
BoolBuilder. Should (QueryBuilders. TermQuery (" corpName ", "hippo"));

BoolBuilder. MustNot (QueryBuilders. TermQuery (" fee ", 1));

BoolBuilder. Must (QueryBuilders. MatchQuery (" province ", "changsha"));
  • Related