# Can Significant text aggregation work on copy\_to fields

**URL:** <https://discuss.elastic.co/t/can-significant-text-aggregation-work-on-copy-to-fields/269908>\
**Category:** Elasticsearch\
**Created:** [April 12, 2021, 3:58pm UTC](https://discuss.elastic.co/t/can-significant-text-aggregation-work-on-copy-to-fields/269908 "2021-04-12T15:58:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sj12345](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sj12345/32/86546_2.png) [@sj12345](https://discuss.elastic.co/u/sj12345)\
**Post date:** [April 12, 2021, 3:58pm UTC](https://discuss.elastic.co/t/can-significant-text-aggregation-work-on-copy-to-fields/269908/1 "2021-04-12T15:58:23Z")

</div>

I want to do a significant text aggregation on a field which was copied from few other fields (i.e. its a copy\_to field)

```auto
 "combined_fields" : {
           "type" : "text",
         "store" : true,
         "norms" : false,
         "fielddata" : true,

```

The significant text aggregation

```auto
  GET MyIndex/_search
    {
      "size" : 0,
      "query": {
        "range": {
          "creation_time": {
            "gte": 1617364155,
            "lte": 1617964155
          }
        }
      },
      "aggregations": {
          "body_words" : {
              "significant_text" : { 
                "field" : "combined_fields",  
                "filter_duplicate_text": true
              }
          }
      }
    }

```

this works but no buckets are shown

```auto
  "aggregations" : {
     "body_words" : {
     "doc_count" : 121,
      "bg_count" : 1232212,       
"buckets" : []
    }
  }
}

```

I do not see any way to add "docvalue\_fields" to the aggregation

Is there any way to extract the aggregation keys when it comes to copy\_to fields ?

References

1. [Significant text aggregation | Elasticsearch Guide [master] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-bucket-significanttext-aggregation.html)

2. [copy\_to | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html)

---

<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:** [April 12, 2021, 7:04pm UTC](https://discuss.elastic.co/t/can-significant-text-aggregation-work-on-copy-to-fields/269908/2 "2021-04-12T19:04:22Z")

</div>

The docs have an example [here](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-aggregations-bucket-significanttext-aggregation.html#_dealing_with_source_and_index_mappings)

---

<div class="post-metadata">

**Author:** ![sj12345](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sj12345/32/86546_2.png) [@sj12345](https://discuss.elastic.co/u/sj12345)\
**Post date:** [April 13, 2021, 3:14am UTC](https://discuss.elastic.co/t/can-significant-text-aggregation-work-on-copy-to-fields/269908/3 "2021-04-13T03:14:34Z")

</div>

Ah, RTFM indeed 🙂 I did not find it because I searched that page for "docvalue\_fields" instead of "copy\_to". Thanks Mark

---

<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:** [May 11, 2021, 3:15am UTC](https://discuss.elastic.co/t/can-significant-text-aggregation-work-on-copy-to-fields/269908/4 "2021-05-11T03:15:03Z")

</div>

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