Retrieve multiple nested documents around the query matched document

Is there a way to retrieve multiple documents around the matching nested document. For example in this document:

Book ID: ISBN8137183
Book Name: Name of the Wind
Chapters: {
{Chapter ID: 1
Gist: some_text_1
{Chapter ID: 2
Gist: some_text_2
{Chapter ID: 3
Gist: some_text_3
{Chapter ID: 4
Gist: some_text_4
{Chapter ID: 5
Gist: some_text_5

In this document where the Chapters field is nested, say my query matches the nested document with Chapter ID 3 then I want to also retrieve {n-1, n+1} documents i.e. I want to retrieve {2,3,4} chapter nested documents. Is there a way to do this?


Any help here would be great !

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