Say I have an analyzed field, and I want to do a search that matches on that field if the field starts with the supplied phrase. For example, say I have two documents, each with a single field:
doc1 : {
name: "the dog is happy"
}
doc2: {
name: "happy the dog is"
}
Say my query string is "the dog is". I want to match doc1 and not doc2. How can I do this?
Thanks!
the dog is
. Will that suffice your requirement. – Richa Apr 7 '16 at 3:57not_analyzed
, your problem will get solved.. – Richa Apr 7 '16 at 4:06