parent

The purpose of this is to aggregate parent documents with the join data type field:

  • Example: The purpose is to obtain a count of symbols that have dividends for the ETF in the cf_etf_dividend_join index:
"aggs": {"dividend":{ "parent": {"type": "dividend" },
"aggs": {"count":{"value_count":{"field":"symbol"}}}}}
  • Resulting buckets: Since we have only one symbol ACWF, the count value is 1:
 "aggregations": { "dividend": { "doc_count": 1, "count": { "value": 1 } } }
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.208.200