Full Text Search and Dictionaries

Atlas describes being able to use a full text search on string typed data.

Does this also apply to string typed dictionaries?
Does this also apply to mixed typed dictionaries that contain string typed data?

Can you share an example document?

The dictionary example from the help documentation is a perfect example of a mixed dictionary.

HomeOwner: {
  name: 'Anna Smith',
  home: {
      address: '2 jefferson lane', 
      yearRenovated: 1994,
      color: 'blue',
      },
}


interface Home extends Realm.Dictionary {
  address?: string;
  color?: string;
  price?: number;
  yearRenovated?: number;
}

class HomeOwner extends Realm.Object<HomeOwner> {
  name!: string;
  home!: Home;
  pets?: Pet[];

  static schema: ObjectSchema = {
    name: 'HomeOwner',
    properties: {
      name: 'string',
      home: 'mixed{}',
      pets: {
        type: 'dictionary',
        objectType: 'Pet',
        optional: true,
      },
    },
  };
}

I believe if you set the data type to document (https://www.mongodb.com/docs/atlas/atlas-search/field-types/document-type/#how-to-index-fields-in-objects-and-documents) it should work

I’ll look into it more and try that out.

I don’t have a direct implementation yet as I’m trying to determine if a dictionary is the best way to go. I’m hesitant moving forward with it, as the default react native example throws GraphQL Model Errors, but that’s an issue for another post.