Skip to content

In hierarchical documents, under certain scenarios, snippets for descendant documents don't turn up #40572

Closed
@kowndinyav

Description

@kowndinyav

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

create.txt
Picture1
query.txt
response.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions