I've been working on retrieving duplicate data from Elasticsearch. However the duplicate filter query I have is not working as expected. I tried the query on KIBANA's search tab but its always showing an error message.
I hope that if my query will work on Kibana, the investigation would be easier. Could you help me create the right query for this?
POST /costing_requests/_search
{
"aggs": {
"duplicateCount": {
"terms": {
"field": "CostInvoiceNumber",
"min_doc_count": 2
}
}
},
"query": {
"filtered": {
"filter": {
"bool": {
"must": [{
"range": {
"tslice": {
"gte": "2017-01-18",
"lte": "2017-01-19"
}
}
}],
"must_not": []
}
}
}
}
}