Hello,
Is there a way to create a facet on children when querying on parent? Is it
even makes sence?
I have this mapping:
{
"mappings" : {
"parentType" : {
"properties" : {
"id" : { "type" : "long"},
"price": { "type" : "double" }
}
},
"childType": {
"_parent": {"type": "parentType"},
"properties": {
"id": {"type": "long"},
"count": {"type":"long"}
}
}
}
}
I want to create a query like facet on nested element:
{
"query": {
"match_all":{}
},
"facets":{
"count_facet":{
"terms": {
"field": "count"
},
"nested": "childType"
}
}
}
Is there a way of achiving facets on the children?
On Thu, Mar 28, 2013 at 7:06 AM, Udi Ben Amitai sabaudi@gmail.com wrote:
Hello,
Is there a way to create a facet on children when querying on parent? Is
it even makes sence?
I have this mapping:
{
"mappings" : {
"parentType" : {
"properties" : {
"id" : { "type" : "long"},
"price": { "type" : "double" }
}
},
"childType": {
"_parent": {"type": "parentType"},
"properties": {
"id": {"type": "long"},
"count": {"type":"long"}
}
}
}
}
I want to create a query like facet on nested element:
{
"query": {
"match_all":{}
},
"facets":{
"count_facet":{
"terms": {
"field": "count"
},
"nested": "childType"
}
}
}
Is there a way of achiving facets on the children?
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.