Searching text with white space

Hi all,
I am quiet new to ElasticSearch and i am facing this issue so hopefully I can find the answer here.
I am searching the full name such as "John Smith" and i expected ElasticSearch to return the documents that containing the string "John Smith" but now ElasticSearch returned to me the documents containing either "John" or "Smith". Is there any way to force ElasticSearch to return the result of "John Smith".

Thanks.

Depends on the query you are using.

With query string query you can change default_operator to AND. See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

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