Java API


(Gennady Novik) #1

How using Java API it is possible to construct next query: (f_name="a*" or
f_name="b*") and (l_name="c*")

    • wildcard

Thanks


(Nicolas Lalevée) #2

Le 22 août 2011 à 12:02, Gennady Novik a écrit :

How using Java API it is possible to construct next query: (f_name="a*" or f_name="b*") and (l_name="c*")

    • wildcard

it is possible, look at the prefix query:
http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html

Nicolas


(Shay Banon) #3

To add to the mentioned answer below, all queries / filters are provided
through simple static factories either using the QueryBuilders or
FilterBuilders classes. Check how to use it here:
http://www.elasticsearch.org/guide/reference/java-api/query-dsl.html. The
search page has an example of how to use it when searching:
http://www.elasticsearch.org/guide/reference/java-api/search.html.

2011/8/22 Nicolas Lalevée nicolas.lalevee@hibnet.org

Le 22 août 2011 à 12:02, Gennady Novik a écrit :

How using Java API it is possible to construct next query: (f_name="a*"
or f_name="b*") and (l_name="c*")

    • wildcard

it is possible, look at the prefix query:
http://www.elasticsearch.org/guide/reference/query-dsl/prefix-query.html

Nicolas


(system) #4