where "body" contains 2 inner fields "en" and "fr".
however when i try to match below document to the registered percolator queries, only first query is returned, second one not.
The likely reason the second query doesn't match is that at the time the percolator query is indexed the body.en field doesn't exist yet. Resulting in this percolator query to not match with any document.
Can you try specifying the body.en field in your mapping and then reindex this query? (maybe the field already exists and then you should try to just reindex the query) I expect that then the second query will match with the percolate query.
Thanks for the reply. You are right, the issue is i used dynamic template and "body" field is an object, so at the time the percolator query "body.*" is indexed, the field "body.en" doesn’t exist yet.
To fix the issue I indexed a fake document which contains all possible languages in the body, e.g body.en, body.fr, body.de etc.... before indexing percolator query "body.*" then delete this document afterward.
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.