DSL query for matching two document fields

Dears ,

am new to elastic community , i need your help to to write elastic query
i have many documents created through logstash and i want to get the result were the documents have same result in different field ,

"filter": {
    "script": {
      "script": "doc['field1'].value ==  doc['field2'].value "

i tried to filter out the result using above query but am getting " no field found for 'field2' in mapping with types "

also advise me how we can match two separate document fields in elk
kindly advise me how can i get exact documents that have same value in two fields

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