Unknown NamedWriteable [org.elasticsearch.index.query.QueryBuilder][has_child] using ESIntegTestCase


(Vaughn) #1

Hi,

I'm using ESIntegTestCase to do some integration tests, most work fine, but as soon as I try to use a has_child query it bombs with "Caused by: java.lang.IllegalArgumentException: Unknown NamedWriteable [org.elasticsearch.index.query.QueryBuilder][has_child]".

I'm just using this addition to the main query and then it bombs, but it works fine without it:
InnerHitBuilder innerHitbuilder = new InnerHitBuilder().setName(typeMapping.getTypeName())
queryBuilder = JoinQueryBuilders.hasChildQuery("page", queryBuilder, ScoreMode.Max).innerHit(innerHitbuilder)

I'm in the middle of a large refactor from ES 2.4 to 5.6, so I've probably broken the query in an interesting way.

Any help will be much appreciated!

Full stack trace here: https://gist.github.com/vaughnd/228885aec3b69d8107aa1c6a4dfdc62e

Cheers,
Vaughn


(Vaughn) #2

After hunting around in the ES source code I found the solution. Turns out there is a ParentJoinPlugin.class that needs to be included.


(system) #3

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