code: function getExcludeFromIndexes() {
          const excluded = [...entity.excludeFromIndexes] || [];
          let isArray;
          let isObject;
          let propConfig;
          let propValue;
  
          Object.keys(data).forEach((prop) => {
              propValue = entity.entityData[prop];
              if (propValue === null) {
                  return;
              }
              propConfig = entity.schema.paths[prop];
  
              isArray = propConfig && (propConfig.type === 'array'
                || (propConfig.joi && propConfig.joi._type === 'array'));
  
              isObject = propConfig && (propConfig.type === 'object'
              || (propConfig.joi && propConfig.joi._type === 'object'));
  
              if (isArray && propConfig.excludeFromIndexes === true) {
                  // We exclude all the primitives from Array
                  // The format is "entityProp[]"
                  excluded.push(`${prop}[]`);
              } else if (isObject && propConfig.excludeFromIndexes === true) {
                  // For "object" type we automatically set all its properties to excludeFromIndexes: true
                  // which is what most of us expect.
                  Object.keys(propValue).forEach((k) => {
                      // We add the embedded property to our Array of excludedFromIndexes
                      // The format is "entityProp.entityKey"
                      excluded.push(`${prop}.${k}`);
                  });
              }
          });
  
          return excluded;
      }
docs: ---------