# Significant field aggregation ElasticSearch

**URL:** <https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350>\
**Category:** Elasticsearch\
**Created:** [March 21, 2019, 4:21pm UTC](https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350 "2019-03-21T16:21:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Stevenson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_stevenson/32/48477_2.png) [@Vincent\_Stevenson](https://discuss.elastic.co/u/Vincent_Stevenson)\
**Post date:** [March 21, 2019, 4:21pm UTC](https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350/1 "2019-03-21T16:21:51Z")

</div>

Is there something similar to ElasticSearch's significant\_text aggregation, but for significant\_fields?

Example: based on the foreground of Json documents, there is an uncommonly common occurrence of the field "RAM capacity" when doing a query on computers. Is there an aggregation or Json query type that will return those uncommonly common field names (RAM capacity, CPU type, HDD capacity, etc)?

Thanks!

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [March 21, 2019, 5:06pm UTC](https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350/2 "2019-03-21T17:06:41Z")

</div>

Nothing out of the box.  
A couple of options spring to mind:

1. Do-it-yourself in the client-side by performing the calculation on foreground/background numbers obtained from a combination of the `global` agg (for background stats) and the `filters` agg with `exists` queries for the fields of interest
2. Re-index the content with a `fieldnames` array of the type `keyword` that lists the fields available on a doc. Using `significant_terms` agg to compute the significance of values.

---

<div class="post-metadata">

**Author:** ![Vincent\_Stevenson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_stevenson/32/48477_2.png) [@Vincent\_Stevenson](https://discuss.elastic.co/u/Vincent_Stevenson)\
**Post date:** [March 21, 2019, 6:03pm UTC](https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350/3 "2019-03-21T18:03:31Z")

</div>

Thanks Mark!

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [March 21, 2019, 7:13pm UTC](https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350/4 "2019-03-21T19:13:13Z")

</div>

FYI the field exists query and the adjacency matrix agg can be used together to show how doc types and fields relate: [https://youtu.be/JzHRuJOCnR0](https://youtu.be/JzHRuJOCnR0)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 18, 2019, 7:13pm UTC](https://discuss.elastic.co/t/significant-field-aggregation-elasticsearch/173350/5 "2019-04-18T19:13:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
