Writing OR-Query with Wildcards using Query DSL

I want to create a DSL query that applies wildcard syntax for multiple values that are OR connected. How can I do this in ES?

By using a terms query I can connect different values as OR for the same field. By using wildcard query I can search with wildcards. But how can I combine this?
And writing all combinations toghether in a bool query would connect them with AND.

So how can I explain follow sentence in query dsl?

Search all Users with field "name" starting with "S" or "T"?


I found a solution using the "query_string". So this seams very powerful.

So that results in two more questions:

  1. Is a query_string slower as writing a bool query with different filters. Or should I better implement both kind of query dsl depending on the users input?
  2. Exists a solution for my use case without using a query string


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.