0
POST /ankita-inex/my_type/_bulk
{ "index": { "_id": 1 }}
{ "title": "The quick brown fox" }
{ "index": { "_id": 2 }}
{ "title": "The quick brown fox jumps over the lazy dog" }
{ "index": { "_id": 3 }}
{ "title": "The quick brown fox jumps over the quick dog" }
{ "index": { "_id": 4 }}
{ "title": "Brown fox brown dog" }
這被成功地張貼,但我想用存在查詢usingMissingQueryElasticSearch- [存在]查詢沒有彈性搜索支持2.3
GET /ankita-inex/my_type/_search
{
"query" : {
"bool": {
"must": {
"exists" : {
"index" : "4"
}
}
}
} }
{
"error":
{
"root_cause": [
{
"type": "query_parsing_exception",
"reason": "[exists] query does not support [index]",
"index": "ankita-inex",
"line": 6,
"col": 20
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "ankita-inex",
"node": "pbwST3JVSlq3sPqBgWoAVg",
"reason": {
"type": "query_parsing_exception",
"reason": "[exists] query does not support [index]",
"index": "ankita-inex",
"line": 6,
"col": 20
}
}
]
},
"status": 400
}
有了這個這將返回文檔文件如何使用MissingQuery進行彈性saerch 2.3。如果有任何示例 –
你想用MissingQuery實現什麼? – Val
其實我是從彈性搜索1.4.3升級到彈性搜索2.3.5的應用程序。現在Elastic Saerch已經刪除了所有的FilterClasses並將它合併到Query.So中,因此我想要這個行的替代API MissingFilterBuilder incProductsEmptyFilter = FilterBuilders.missingFilter(「 missingfilter「); –