I'm new to Elasticsearch. I have created an index named "files". Then I have added a document with fields 'name' & 'content', under the type "text". like below.
curl -XPUT 'localhost:9200/files/text/1?pretty' -H 'Content-Type: application/json' -d'
{
"name" : "Readme",
"content" : "Hi this is a sample document.I created this document to explore the features of elasticsearch"
}'
I want to search in the 'content' field of this document for a keyword [for eg.'this'] and get its offsets. Is it possible ?. Actually my requirement is to get the offsets of a keyword in 'n' documents in an index