Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Started
Categories Atlas Search
Created by Guest
Created on Oct 7, 2019

Support for nested datatype search

It appears that Atlas Search does not yet support nested documents in arrays like MongoDB https://docs.mongodb.com/v4.2/reference/operator/query/elemMatch/
  • ADMIN RESPONSE
    Oct 18, 2025
    Tutorial for how to implement can be found here. ( https://www.mongodb.com/docs/atlas/atlas-search/tutorial/embedded-documents-tutorial/ )
  • Guest
    May 20, 2021
    Yes, Much needed. We are stuck on the point as we need to search where a single nested document from an array matches all the conditions. like it is supported with elemMatch in Mongo Search.
  • Guest
    Jul 30, 2020
    If you have array of objects - it's impossible to allows arrays of objects to be indexed in a way that they can be queried independently of each other. Using 'document' type can return fields that are flattened into multi-value fields, and the association between fields in subobjects is lost. Details can be found in a link above.
  • Guest
    Mar 24, 2020
    It does for strings. For example if you had the mapping: ``` { "analyzer": "lucene.standard", "searchAnalyzer": "lucene.standard", "mappings": { "dynamic": false, "fields": { "values": { "fields": { "stringValue": { "type": "string" } }, "type": "document" } } } } ``` And a document in your db: ``` { values: [ { textValue: "here is some example text" } } } ``` And the query: ``` db.answers.aggregate([ { $searchBeta: { near: { query: "example", path: "values.textValue" } } } ]) ``` Then it will work...