PayloadIndexParams

@Serializable
sealed interface PayloadIndexParams

The parameters Qdrant accepts beside the index type, one shape per type.

PayloadSchemaType names the kind of index; this names how it is built. Two of the choices decide whether a query works at all rather than how fast it is: a matchPhrase filter matches nothing unless the text index was created with Text.phraseMatching, and an index built without Keyword.isTenant leaves a multi-tenant collection's points scattered across the disk rather than grouped per tenant. The rest are cost: onDisk is the difference between an index that has to fit in RAM and one that does not.

Build one with the DSL rather than by hand:

qdrant.createPayloadIndex("docs", "body") {
text { tokenizer = Tokenizer.WORD; phraseMatching = true }
}

Qdrant takes two further text options this does not model, stopword sets and stemming, because both are sub-objects with their own vocabulary rather than a flag. They are the reason this type is a sealed hierarchy that can grow a field without breaking a caller.

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "bool")
data class Bool(val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A boolean index.

Link copied to clipboard
@Serializable
@SerialName(value = "datetime")
data class Datetime(val isPrincipal: Boolean? = null, val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A datetime index, for datetimeRange filters. See Integer.isPrincipal.

Link copied to clipboard
@Serializable
@SerialName(value = "float")
data class Float(val isPrincipal: Boolean? = null, val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A float index. See Integer.isPrincipal for what isPrincipal decides.

Link copied to clipboard
@Serializable
@SerialName(value = "geo")
data class Geo(val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A geo index, for geoRadius, geoBoundingBox and geoPolygon filters.

Link copied to clipboard
@Serializable
@SerialName(value = "integer")
data class Integer(val lookup: Boolean? = null, val range: Boolean? = null, val isPrincipal: Boolean? = null, val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

An integer index.

Link copied to clipboard
@Serializable
@SerialName(value = "keyword")
data class Keyword(val isTenant: Boolean? = null, val onDisk: Boolean? = null, val prefix: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A keyword index: exact matches on a string or a list of strings.

Link copied to clipboard
@Serializable
@SerialName(value = "text")
data class Text(val tokenizer: Tokenizer? = null, val minTokenLen: Int? = null, val maxTokenLen: Int? = null, val lowercase: Boolean? = null, val phraseMatching: Boolean? = null, val asciiFolding: Boolean? = null, val stemmer: StemmingAlgorithm? = null, val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A full-text index, for matchText, matchTextAny and matchPhrase.

Link copied to clipboard
@Serializable
@SerialName(value = "uuid")
data class Uuid(val isTenant: Boolean? = null, val onDisk: Boolean? = null, val memory: Memory? = null, val enableHnsw: Boolean? = null) : PayloadIndexParams

A UUID index. See Keyword.isTenant for what isTenant decides.

Properties

Link copied to clipboard
abstract val enableHnsw: Boolean?

Whether Qdrant builds the extra HNSW links for this field, which is what makes a filtered search over it read one tenant's or one category's points instead of walking the collection and discarding. It needs payloadM above zero on the HNSW config to do anything, so a caller who sets one without the other has asked for half of a multi-tenant layout.

Link copied to clipboard
abstract val memory: Memory?

Memory placement of the index. Overrides onDisk when both are set.

Link copied to clipboard
abstract val onDisk: Boolean?

Whether Qdrant keeps this index on disk instead of in RAM. null leaves the server's default.