Represents a single-column or multi-column index that can be used to find items more efficiently in the metadata store.


typedef struct _CUSTOM_FIELDS_INDEX
  LPCWSTR * ppcszCustomFieldNames;
  BYTE cCustomFields;
  BOOL fUniqueIndex;


  • ppcszCustomFieldNames
    The list of indexed field names.

  • cCustomFields
    The number of names in ppcszCustomFieldNames.

  • fUniqueIndex
    TRUE if the index uniquely identifies an item; otherwise, FALSE.


The index schema is defined when the metadata is initialized for the replica by using ISyncMetadataStore::InitializeReplicaMetadata. The fields that are contained in the index schema must also exist in the custom field schema that is defined for the replica.

If an index is unique, querying on a specific set of values for the index fields will yield at most a single item. Also, trying to add a second item to the metadata store that has the same set of values will result in an error.

An index must be defined as unique when the replica metadata is initialized so that later the index can use certain methods in Metadata Storage Services, such as IReplicaMetadata::FindItemMetadataByUniqueIndexedFields.


Header: Metastore.h

See Also


Sync Framework Metadata Storage Service Components