CUSTOM_FIELDS_INDEX Structure

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;
} CUSTOM_FIELDS_INDEX;

Members

  • 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.

Remarks

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.

Requirements

Header: Metastore.h

See Also

Concepts

Sync Framework Metadata Storage Service Components