0

Помогите перевести sql-выражение в запрос для Elasticsearch(v6.x):

select IndexA.* from IndexA where IndexA.NAME like ('%stics%') and IndexA.ID in (1,2,3,4)

Спасибо.

1 ответ 1

0

Примерно - так:

POST /IndexA/_search -d '
{
 "query" : {
  "bool" : { 
    "must" : [
        {
            "wildcard" : {
                    "name" : "*stics*"
            } 
        },
        { 
            "terms" : {
                "_id" : ["1", "2", "3"] 
            }
        }
    ]
  }
 }
}'

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.