How to use cardinality add more fields

Hi bro
I can't upgrade my instance. my instance is 7.9.3.  I  want to use three field to search .I create a table with three cardinality `fields` ,but there is no effective,the data looks like repeated


GET /testPreformatted text_2022_9/_search
{
  "query": {
    "bool": {
      "filter": [
        {
          "match": {
            "field1": "123"
          }
        }
      ]
    }
  },
  "from": 0,
  "size": 200,
 
  "aggs": {
    "job_count": {
      "cardinality": {
         "script": "doc['field2'].value + '#' + doc['field3'].value + '#' + doc['field4'].value",
        "precision_threshold": 40000
      }
    }
  },
  "track_total_hits": true
}

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