We have integration tests set up using the ESIntegTestCase, in upgrading to 5.6.8 from 5.1.2 all of our has_child queries get the following errors: {"error":{"root_cause":[{"type":"parsing_exception","reason":"no [query] registered for [has_child]","line":1,"col":40}],"type":"parsing_exception","reason":"no [query] registered for [has_child]","line":1,"col":40},"status":400}
Here is an example query. The query is successful against our es 5.6.8 server: {"query":{"bool":{"must":[{"has_child":{"query":{"bool":{"must":[{"term":{"value":{"value":"cat","boost":1.0}}}],"filter":[{"term":{"name":{"value":"title","boost":1.0}}}],"disable_coord":false,"adjust_pure_negative":true,"boost":1.0}},"type":"field","score_mode":"none","min_children":0,"max_children":2147483647,"ignore_unmapped":false,"boost":1.0}}],"filter":[{"type":{"value":"main","boost":1.0}}],"disable_coord":false,"adjust_pure_negative":true,"boost":1.0}},"size":1000,"sort":["_uid"]}
I've found this similar forum post, but I'm pretty sure the proposed fix was to use ESIntegTestCase.
Now the test cases run. I don't understand why there isn't a similar process to install ParentJoinPlugin so my server will understand has_child queries?
I have one more question. I made this work, but I don't think i'm doing it right. My plugin uses the HasChildQueryBuilder class. I get a no-class-definition error when running in 5.6.8.
I fixed this by adding parent-join-client.jar to my plugin.zip.
This worked and all errors went away, but I don't think this is the correct way to add this jar.
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.