No [query] registered for [has_child] for ESIntegTestCase in 5.6.8

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:

I've found this similar forum post, but I'm pretty sure the proposed fix was to use ESIntegTestCase.


The parent-join functionality is implemented as a module and thus not provided as part of the ESIntegTestCase.


Thanks for the answer, I made some progress.
I added ParentJoinPlugin.class to my nodePlugins in my test case, like so:

protected Collection<Class<? extends Plugin>> nodePlugins() {
    return Arrays.asList(C3POPlugin.class, Netty4Plugin.class, ParentJoinPlugin.class);

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
This worked and all errors went away, but I don't think this is the correct way to add this jar.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.