D
D
diqeeeeeeeeeeei2018-10-31 12:14:17
elasticsearch
diqeeeeeeeeeeei, 2018-10-31 12:14:17

How to filter aggregation in elasticsearch?

I am doing this aggregation:

{
"aggs": {
    "characteristics": {
        "terms": {
            "field": "product_char.char_id"
        },
        "aggs": {
            "value": {
                "terms": {
                    "field": "product_char.value.keyword"
                }
            }
        }
    }
}
}

And I want to get the unique value of a particular characteristic, but instead in value I get all possible values ​​​​of all characteristics combined. How to make it so that each unique characteristics has its own set of unique values

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question