Description
Elasticsearch version : AWS Elastic Search Service 5.1
Plugins installed: []
JVM version : Should be what ever JVM bundled with AWS Elastic Search Service
OS version (uname -a
if on a Unix-like system):
Description of the problem including expected versus actual behavior:
We have an application where we store documents in hierarchical manner. At a high level, structure is "board -> post -> comment -> reply".
The requirement is to be able to search given text inside "Post" hierarchy i.e if text matches any of the fields from post, comment and reply documents, return post with matched snippets. One problem that we are observing is, post object is always returned when it matches any of the post, comment and reply fields. But in some cases snippets are not turning up.
For example, in the given scenario from the attachments, when searched for text "document", it fails to produce comment snippet for '202_post' (post it-self is returned).
According to my understanding, given that post object is always returned with matched criteria, there is no issue in matching but there is some issue preparing the response for snippets.
Steps to reproduce
Attachments should help in reproducing the issue
-
- create.txt - contains ES fragment to create a test index and the documents
-
- query.txt - contains intended ES query
-
- response.txt - contains the response
-
- picture1.png - a visual representation of what goes wrong in the response