How to get both child and parent fields information


(ravikumar kotta) #1

Hi,
I used to "has_child" to get the child type information of the parent... like following...

curl -XGET 'http://localhost:9200/test/product/_search?pretty=1' -d '{
"query":{
"bool":{
"must":[
{
"has_child":{
"type":"product_extra",
"query":{
"query_string":{
"query":"sports"
}
}
}
}
]
}
}
}'

but if i want to search in product_extra instead of product... what to do.... can u please solve my problem for the reverse ...... and need to get fields from parent type and child type......


(system) #2