Exact phrase search

HI,
I am new to elastic search.i wanted to know how to query for exact search.
Example if am searching for "charlie"
and i have "charlie chaplin" ,"charlie walter","charlie","charlie123"

i am expecting result only "charlie"
i am trying to use terms

Terms(s=>s.field("fieldname").Terms("charlie"))  

it gives me "charlie chaplin","charlie walter" and "charlie" can anyone guide,what i must be doing here?

This is fully expected behaviour from an Elasticsearch point of view, as all documents that contain the term charlie are returned. As you can see, search engines tend to behave a little bit different compared to other data stores.

In order to understand how a field is indexed and stored and searched I highly recommend you to read Elasticsearch - The definitive guide, especially the Search in Depth

Despite its age this is still one of the best introductions into this topic.

Thanks will go through it

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