Can Significant text aggregation work on copy_to fields

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)

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

The significant text aggregation

  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

  "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

  2. copy_to | Elasticsearch Guide [7.12] | Elastic

The docs have an example here

Ah, RTFM indeed :slight_smile: I did not find it because I searched that page for "docvalue_fields" instead of "copy_to". Thanks Mark

1 Like

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