How to build a span near query with nested objects?

I have a document like:

Document: {
documentId,
name,
content,
SubDocuments:[{
name,
displayName,
content
}]
}

and want to run a span_near query over the nested SubDocument properties. Any idea how to achieve this?

Thanks,

1 Like