Darshan Hiranandani : Accessing Specific Objects in Sub-Documents with Atlas Search

Hi Team,

I’m Darshan Hiranandani, currently working with Atlas Search and need to access only the specific object in a sub-document where there was a match. I’m unsure of the best approach to achieve this.

Has anyone dealt with this before? I’d appreciate your suggestions on how to:

  1. Query effectively to target only the matched sub-document.
  2. Optimize the search for performance while accessing specific objects.
  3. Handle cases where there are multiple matches within the same sub-document.

Any insights or examples you can share would be really helpful!

Thanks in advance!

Regards
Darshan Hiranandani

As requested in many of your other threads, please provide follow up on the replies you got.

There is no team if you do not follow up on the replies of other members.

Hi @Darshan_Hiranandani , does this example on how to return only matching child docs help?

Handle cases where there are multiple matches within the same sub-document.
For this case, do you expect to return all matches in the sub-document?