Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch + criteria pattern #327

Open
rogerguasch opened this issue Oct 18, 2022 · 0 comments
Open

Elasticsearch + criteria pattern #327

rogerguasch opened this issue Oct 18, 2022 · 0 comments

Comments

@rogerguasch
Copy link

rogerguasch commented Oct 18, 2022

Buenas,
a la hora de buscar con multiples "terms" o "wildcard" da un error de que la query esta mal formada: [term] query doesn't support multiple fields.

En el código actual se monta una query parecida a esta:

GET cursos/_search
{
    "query": {
      "bool": {
        "must" :{
          "term":{
            "first_name" : "john",
            "middle_name" : "walter",
            "last_name" : "lastname",
            "email" : "email@hola.com",
          }
        }
      }
    },
    "sort":{
      "created_at":{
        "order" : "DESC"
      }
    }
}

Y dentro del devtools ya te dice que no se puede hacer asi :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant