Click or drag to resize

IDataEnricherApiCreateIndex Method

Create an index for attributes of data class.

Namespace:  Casewhere.Runtime.DSL.Api
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
void CreateIndex(
	string dataClassName,
	DslIndexDefinition indexDefinition
)

Parameters

dataClassName
Type: SystemString
Data class name by user defined
indexDefinition
Type: Casewhere.Runtime.DSLDslIndexDefinition
Index information
Examples
var dataClassName = "Company";
var indexDefinition = new DslIndexDefinition()
{
    Name= "CompanyName", //User define
    Keys = new List<DslIndexKeyDefinition>()
    {
        new DslIndexKeyDefinition(name: "CompanyName", indexType: 1)
    }
}; 
var dataEnricherApi = ctx.Use<IDataEnricherApi>();
dataEnricherApi.CreateIndex(dataClassName, indexDefinition);
See Also