ConventionConfigurationDocumentIdGenerator Property

Gets or sets a method that generates a document id for the given document. There is no default method. An exception will be thrown if no id generator has been configured and a document without a valid id (as determined by DocumentNeedsIdAssigned is about to be stored in an index.

Definition

Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.1.0
C#
public Func<Object, Object> DocumentIdGenerator { get; set; }

Property Value

FuncObject, Object

Remarks

This method will be invoked during Save(Object) if DocumentNeedsIdAssigned returned true for the given document. Please note that your implementation of an id generator needs to make sure that it is thread-safe.

See Also