Я пытаюсь получить документы из эластичного поиска с несколькими полями, используя оператор AND
для запроса ниже, ожидаю следующих результатов
AB-7000-8002-W
Но получаю этосообщение об ошибке Unrecognized token 'get': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@40d2a7e8; line: 1, column: 5]
get my_index12/_search {
"query" : {
"bool": {
"should": [
{
"match": {
"code": {
"query": "AB-5000-6002-AK",
"operator": "and"
}
}
},
{
"match": {
"locale": {
"query": "en_US",
"operator": "and"
}
}
}
]
}
}
}
Ниже приведены мои индексные документы
{
"_index": "my_index12",
"_type": "doc",
"_id": "2",
"_score": 1,
"_source": {
"code": "AB-7000-8002-W",
"locale": "en_US"
}
},
{
"_index": "my_index12",
"_type": "doc",
"_id": "4",
"_score": 1,
"_source": {
"code": "AB-7000-8002-W",
"locale": "en_EU"
}
},
{
"_index": "my_index12",
"_type": "doc",
"_id": "1",
"_score": 1,
"_source": {
"code": "sG66tsdF",
"locale": "en_US"
}
},
{
"_index": "my_index12",
"_type": "doc",
"_id": "3",
"_score": 1,
"_source": {
"code": "AB-7000-6002-WK",
"locale": "en_EU"
}