This filter will work. Have you called refresh before you executed the search and after you indexed the document? If it still does not work, gist a curl recreation (Elasticsearch Platform — Find real-time answers at scale | Elastic).
On Thursday, March 10, 2011 at 3:33 PM, K.B. wrote:
Hello,
I if one has an ArrayField like
field = ["Val1","Val2","Val3"]
and its not_analyzed by mapping then in case a Filter is tried to be
put over it:
FilterBuilders.termFilter("field", "Val1");
the resulting query the flter is put to will allways have 0 results.
see, you put a big query around your 2 queries, while the java
transformates to the thing shown below - and that gives null back in
elasticsearch-head and gives no error as valid JSON;
My data seems ok as it works with either your JSON code or if I put it
into the first querystring;
see, you put a big query around your 2 queries, while the java
transformates to the thing shown below - and that gives null back in
elasticsearch-head and gives no error as valid JSON;
I'm not cheating That is the correct syntax when using the HTTP API:
Whatever query you pass in needs to be passed as the value of the
'query' parameter. You can't pass a 'filtered' query as a top level
param.
Note: there was an incorrect example of a filtered query on
now thats different then.... ok, the JSON now seems ok and - please
dont ask me why - my java also now works.... haven't changed a line,
just an appserver restart...
see, you put a big query around your 2 queries, while the java
transformates to the thing shown below - and that gives null back in
elasticsearch-head and gives no error as valid JSON;
I'm not cheating That is the correct syntax when using the HTTP API:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.