# Have to support multiple child types in has\_childA?

**URL:** https://discuss.elastic.co/t/have-to-support-multiple-child-types-in-has-childa/138894
**Category:** Elasticsearch
**Created:** [July 6, 2018, 10:53am UTC](https://discuss.elastic.co/t/have-to-support-multiple-child-types-in-has-childa/138894 "2018-07-06T10:53:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shendl](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@shendl](https://discuss.elastic.co/u/shendl)
#### Post date: [July 6, 2018, 10:53am UTC](https://discuss.elastic.co/t/have-to-support-multiple-child-types-in-has-childa/138894/1 "2018-07-06T10:53:26Z")

</div>

mapping：

```
"rhmjoin": {
	"type": "join",
	"relations": {
		"dagrxx": ["gxysfjl", "tnbsfjl"]
	}
}   

```

query：

```
{
	"query": {
		"has_child": {
			"type": ["gxysfjl", "tnbsfjl"],
			"query": {
				"script": {
					"script": {
						"lang": "painless",
						"inline": "doc['gxysfjl.sfrq'].value == doc['tnbsfjl.sfrq'].value"
					}
				}
			}
		}
	}
}

```

It's not work ！-。-, Any other solutions? many thanks in advance!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 3, 2018, 10:53am UTC](https://discuss.elastic.co/t/have-to-support-multiple-child-types-in-has-childa/138894/2 "2018-08-03T10:53:30Z")

</div>

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