मेरे पास सभी मिलान दस्तावेजों को हटाने के लिए निम्नलिखित नेस्ट क्वेरी है, काफी सीधे आगे है लेकिन मुझे 400 खराब अनुरोध मिल रहा है।Elasticsearch DeleteByQuery काम नहीं कर रहा है, 400 खराब अनुरोध प्राप्त कर रहा है
var client = new ElasticClient();
var request = new DeleteByQueryRequest<Type>("my-index")
{
Query = new QueryContainer(
new TermQuery
{
Field = "versionId",
Value = "ea8e517b-c2e3-4dfe-8e49-edc8bda67bad"
}
)
};
var response = client.DeleteByQuery(request);
Assert.IsTrue(response.IsValid);
किसी भी मदद के लिए धन्यवाद।
--------------- अद्यतन ---------------
अनुरोध शरीर
{"query":{"term":{"versionId":{"value":"ea8e517b-c2e3-4dfe-8e49-edc8bda67bad"}}}}
रिस्पांस शरीर नब्ज प्लगइन में
{"took":0,"timed_out":false,"_indices":{"_all":{"found":0,"deleted":0,"missing":0,"failed":0}},"failures":[]}
क्वेरी:
GET /my-index/type/_search
{
"query": {
"match": {
"versionId": "ea8e517b-c2e3-4dfe-8e49-edc8bda67bad"
}
}
}
क्वेरी प्रतिक्रिया:
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 116,
"max_score": 2.1220484,
"hits": []
...
}}
--------------- घोंसला क्वेरी के --------------
DELETE http://localhost:9200/my-index/component/_query?pretty=true
{
"query": {
"term": {
"versionId": {
"value": "ea8e517b-c2e3-4dfe-8e49-edc8bda67bad"
}
}
}
}
Status: 200
{
"took" : 0,
"timed_out" : false,
"_indices" : {
"_all" : {
"found" : 0,
"deleted" : 0,
"missing" : 0,
"failed" : 0
}
},
"failures" : [ ]
}
एलैस्टिकसेर्च का कौन सा संस्करण आप लक्षित कर रहे हैं और आप किस एनईईटी का उपयोग कर रहे हैं? –