Transport client document insert with version 1.5 string is splitting with space

elastic search transport client document insert is splitting the word with space.

e.g., Sachin Tendulkar is splitted as Sachin and Tendulkar two words. When we query I am getting the first word only.

Please let me know how to avoid this?

This is how elasticsearch works. It analyzes your text and breaks it into tokens.

Read this chapter: https://www.elastic.co/guide/en/elasticsearch/guide/master/mapping-analysis.html

If you want to index a full string with no transformation, you can use index: not_analyzed in your mapping. But then you will be able to match only the full string.

Thank you for the response. I understood this concept. I wanted to know is there any java API I can set this not analyzed for the complete index fields using transport client.

Thank you, I am able to resolve the issue.