I have a scene.

-------------------------
Data A
{
    name:"foodA",
    props:{
      color: "red",
      taste: "sweet",
      xx: xx,
      xx: xx
    }
}

Date B
{
    name:"foodB",
    props:{
      color: "black",
      taste: "sweet",
      xx: xx,
      xx: xx
    }
}



the props field is dynamic, is custom.


-----------------------------

i want result data is

{
    "aggregation": {
         color: [
            {key:"red", count: 1},
            {key:"black", count: 1}
         ],
         xx: [
            {key:"xx", count: xx},
         ]
     }
}

----------------------------

i use the dsl
{
  "aggs": {
    "all": {
      "terms": {
        "field": "props.*"
      }
    }
  }
}


but return nothing.  i don't konw how to do

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/7f62cfb3-bd7b-4831-b29a-824f04a71422%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to