E
E
Emil Revencu2021-02-20 01:04:48
elasticsearch
Emil Revencu, 2021-02-20 01:04:48

Must request with wildcard not working?

It is necessary to display all records that have convergence in 2 columns
in Mysql did as

SELECT * FROM table where firstname LIKE 'ИВ%' AND lastname LIKE 'ПЕТ%'

Made a similar request in ES:
{
  "query": {
    "bool":{
      "must" : [
        {"wildcard": {"firstname": "ИВ*"}},
        {"wildcard": {"lastname": "ПЕТ*"}},
      ],
    }
  }
}

But it doesn't return anything.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question