Java elasticsearch, find by part of the work

I have small problem with Java elasticsearch (2.3.3)

TransportClient client = TransportClient.builder().build()
                .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(""), 9300));
QueryBuilder qb = multiMatchQuery(
            "org", // George


    SearchResponse response = client.prepareSearch("user")

    for(SearchHit hit : response.getHits()){

By fuzziness, I can find when I did not type 2 letters.

I want it to find a user by firstname or lastname, by 3 or more letters.
I was searching for a way to do that last few hours.

In this case I need to find “George Michel” by typing just “org”, but no luck.

Thanks for help.

Source: java

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.