IndexSchema.IsUnique Property

Gets a value that indicates whether this index schema uniquely identifies an item.

Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)

public bool IsUnique { get; }
/** @property */
public boolean get_IsUnique ()

public function get IsUnique () : boolean

Property Value

true if this index schema uniquely identifies an item; otherwise, false.

If an index schema is unique, querying on a specific set of values for the schema 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 schema must be defined as unique when the replica metadata is initialized so that later the index schema can use certain methods in the metadata storage service, such as ReplicaMetadata.FindItemMetadataByUniqueIndexedField.

Show: