problem description
RT
ES structure is as follows:
{
"has_hot_act": 1, "tags": ["59224b430926a862244afc7b", "57faf0a10926a8459c6f1389"]
}
{
"has_hot_act": 1, "tags": [], act []
}
how to use ES java API to determine whether the array is empty and query the tag array?
the environmental background of the problems and what methods you have tried
I can"t find a lot of information on the Internet.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
the method I try is
booleanQuery.mustNot (QueryBuilders.termQuery ("tags", "[]"));
booleanQuery.mustNot) (QueryBuilders.termQuery ("tags", new ArrayList < > ();
query array must not be empty, but still query the empty array.
what result do you expect? What is the error message actually seen?
I hope the great god will come out and give us some advice. I appreciate it.