Table of Contents

Class TableIndexBuilder

Namespace
DataStax.AstraDB.DataApi.Tables
Assembly
DataStax.AstraDB.DataApi.dll

An index builder for tables.

public class TableIndexBuilder
Inheritance
TableIndexBuilder
Inherited Members

Methods

Index(TableIndexOptions)

Create a default table index.

public TableIndexDefinition Index(TableIndexOptions options = null)

Parameters

options TableIndexOptions

A TableIndexOptions specification for the indexing options. Pass null for defaults

Returns

TableIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Map(MapIndexType)

Create a table index for a map column.

public TableIndexDefinition Map(MapIndexType mapIndexType)

Parameters

mapIndexType MapIndexType

A MapIndexType value specifying how the map is indexed (keys, values or entries).

Returns

TableIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Map(MapIndexType, TableIndexOptions)

Create a table index for a map column.

public TableIndexDefinition Map(MapIndexType mapIndexType, TableIndexOptions options = null)

Parameters

mapIndexType MapIndexType

A MapIndexType value specifying how the map is indexed (keys, values or entries).

options TableIndexOptions

A TableIndexOptions specification for the indexing options. Pass null for defaults

Returns

TableIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Text()

Create a table text index using the default analyzer.

public TableTextIndexDefinition Text()

Returns

TableTextIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Text(AnalyzerOptions)

public TableTextIndexDefinition Text(AnalyzerOptions analyzerOptions)

Parameters

analyzerOptions AnalyzerOptions

An AnalyzerOptions object defining the analyzer options for the indexing.

Returns

TableTextIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Text(TextAnalyzer)

public TableTextIndexDefinition Text(TextAnalyzer analyzer)

Parameters

analyzer TextAnalyzer

A TextAnalyzer value specifying a preset indexing method.

Returns

TableTextIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Text(object)

Create a table text index using custom, free-form analyzer options. See https://docs.datastax.com/en/astra-db-serverless/databases/analyzers.html#supported-built-in-analyzers

public TableTextIndexDefinition Text(object analyzer)

Parameters

analyzer object

A free-form object defining the analyzer options for the indexing.

Returns

TableTextIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Text(string)

Create a table text index using a specific analyzer by name, for example a language-specific analyzer. See https://docs.datastax.com/en/astra-db-serverless/databases/analyzers.html#supported-built-in-analyzers

public TableTextIndexDefinition Text(string analyzer)

Parameters

analyzer string

A string value specifying a preset indexing method.

Returns

TableTextIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Vector()

Create a table vector index.

public TableVectorIndexDefinition Vector()

Returns

TableVectorIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Vector(SimilarityMetric)

Create a table vector index.

public TableVectorIndexDefinition Vector(SimilarityMetric metric)

Parameters

metric SimilarityMetric

Similarity metric to use for vector searches on this index

Returns

TableVectorIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Vector(SimilarityMetric?, string)

Create a table vector index.

public TableVectorIndexDefinition Vector(SimilarityMetric? metric, string sourceModel)

Parameters

metric SimilarityMetric?

Similarity metric to use for vector searches on this index

sourceModel string

Allows enabling certain vector optimizations on the index by specifying the source model for your vectors. Pass a null for server default.

Returns

TableVectorIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.

Vector(string)

Create a table vector index.

public TableVectorIndexDefinition Vector(string sourceModel)

Parameters

sourceModel string

Allows enabling certain vector optimizations on the index by specifying the source model for your vectors

Returns

TableVectorIndexDefinition

An index definition for use in a Table<T> CreateIndex method call.