ConventionConfiguration Properties

Properties

DocumentIdGenerator 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.
DocumentNeedsIdAssigned Gets or sets a method that determines whether the given document needs to have an id assigned before saving. If not, DocumentIdGenerator will be called to generate an id which will then be assigned to the document. The default method will return false, if the id member (determined by IsIdMember) has a value greater 0, otherwise true.
GetAttributeName Gets or sets a method that returns the attribute name for the given property or field. The default uses the member name and converts it to all lower case letters.
GetIndexName Gets or sets the method that returns the index names(s) for the given type. The default converts the type name to lower case and pluralizes it (by appending an 's').
GetJsonFieldName Gets or sets a method that returns the field name for the given property or field of a JSON object. The default uses the member name as is, without any modifications.
IsFulltextFieldOnly Gets or sets a method that determines if the given property or field of type string is a full-text field only, i.e. it is not available as a string attribute in the index. The default always returns false.
IsIdMember Gets or sets a method that determines if the given property or field of a type represents the document id. The default looks for a member named Id.
SaveEnumsAsIntegers Gets or sets a value that indicates whether enums should be persisted as integers. Default is true.
SerializeTypeAsJson Gets or sets a method that determines if the given type should be serialized to JSON. The default is to serialize types to JSON if they can't be stored in any other Sphinx attribute type.

See Also