schema

Add a property to a collection

Adds a new property definition to an existing collection (className) definition.

post/schema/{className}/properties

Request

  • Base URL: https://localhost:8080/v1
  • URL: https://localhost:8080/v1/schema/{className}/properties
  • Auth: one of:
    • none
    • OAuth 2 (implicit, authorization URL http://to-be-configured-in-the-application-config)

Path parameters

classNamestring required

The name of the collection (class) to add the property to.

Request body

dataTypestring[]

Data type of the property (required). If it starts with a capital (for example Person), may be a reference to another type.

descriptionstring

Description of the property.

moduleConfigobject

Configuration specific to modules in a collection context.

namestring

The name of the property (required). Multiple words should be concatenated in camelCase, e.g. nameOfAuthor.

indexInvertedboolean nullable

(Deprecated). Whether to include this property in the inverted index. If false, this property cannot be used in where filters, bm25 or hybrid search.

Unrelated to vectorization behavior (deprecated as of v1.19; use indexFilterable or/and indexSearchable instead)

bucketGenerationinteger

Internal RAFT-replicated counter bumped by semantic runtime-reindex migrations (e.g. change-tokenization, enable-filterable, enable-searchable). Used by the data path to resolve the property's inverted-index bucket name; a single RAFT commit flipping the schema flag AND bumping this counter atomically cuts the cluster from the old bucket to the new one. Defaults to 0. Internal use; clients should not set this.

searchableBlockmaxboolean nullable

Internal RAFT-replicated per-property flag: true iff this property's searchable (BM25) bucket is on the blockmax (StrategyInverted) index. Stamped at migration cutover. Absent/null means "not stamped" and is resolved against the class-wide UsingBlockMaxWAND flag. Internal use; clients must not set this.

indexFilterableboolean nullable

Whether to include this property in the filterable, Roaring Bitmap index. If false, this property cannot be used in where filters.

Note: Unrelated to vectorization behavior.

indexSearchableboolean nullable

Optional. Should this property be indexed in the inverted index. Defaults to true. Applicable only to properties of data type text and text[]. If you choose false, you will not be able to use this property in bm25 or hybrid search. This property has no affect on vectorization decisions done by modules

indexRangeFiltersboolean nullable

Whether to include this property in the filterable, range-based Roaring Bitmap index. Provides better performance for range queries compared to filterable index in large datasets. Applicable only to properties of data type int, number, date.

tokenization'word' | 'lowercase' | 'whitespace' | 'field' | 'trigram' | 'gse' | 'kagome_kr' | 'kagome_ja' | 'gse_ch'

Determines how a property is indexed. This setting applies to text and text[] data types. The following tokenization methods are available:

  • word (default): Splits the text on any non-alphanumeric characters and lowercases the tokens.
  • lowercase: Splits the text on whitespace and lowercases the tokens.
  • whitespace: Splits the text on whitespace. This tokenization is case-sensitive.
  • field: Indexes the entire property value as a single token after trimming whitespace.
  • trigram: Splits the property into rolling trigrams (three-character sequences).
  • gse: Uses the gse tokenizer, suitable for Chinese language text. See gse docs.
  • kagome_ja: Uses the Kagome tokenizer with a Japanese (IPA) dictionary. See kagome docs.
  • kagome_kr: Uses the Kagome tokenizer with a Korean dictionary. See kagome docs.

See Reference: Tokenization for details.

disableDuplicatedReferencesboolean nullable

If set to false, allows multiple references to the same target object within this property. Setting it to true will enforce uniqueness of references within this property. By default, this is set to true.

Response

Property added successfully and its definition returned.

dataTypestring[]

Data type of the property (required). If it starts with a capital (for example Person), may be a reference to another type.

descriptionstring

Description of the property.

moduleConfigobject

Configuration specific to modules in a collection context.

namestring

The name of the property (required). Multiple words should be concatenated in camelCase, e.g. nameOfAuthor.

indexInvertedboolean nullable

(Deprecated). Whether to include this property in the inverted index. If false, this property cannot be used in where filters, bm25 or hybrid search.

Unrelated to vectorization behavior (deprecated as of v1.19; use indexFilterable or/and indexSearchable instead)

bucketGenerationinteger

Internal RAFT-replicated counter bumped by semantic runtime-reindex migrations (e.g. change-tokenization, enable-filterable, enable-searchable). Used by the data path to resolve the property's inverted-index bucket name; a single RAFT commit flipping the schema flag AND bumping this counter atomically cuts the cluster from the old bucket to the new one. Defaults to 0. Internal use; clients should not set this.

searchableBlockmaxboolean nullable

Internal RAFT-replicated per-property flag: true iff this property's searchable (BM25) bucket is on the blockmax (StrategyInverted) index. Stamped at migration cutover. Absent/null means "not stamped" and is resolved against the class-wide UsingBlockMaxWAND flag. Internal use; clients must not set this.

indexFilterableboolean nullable

Whether to include this property in the filterable, Roaring Bitmap index. If false, this property cannot be used in where filters.

Note: Unrelated to vectorization behavior.

indexSearchableboolean nullable

Optional. Should this property be indexed in the inverted index. Defaults to true. Applicable only to properties of data type text and text[]. If you choose false, you will not be able to use this property in bm25 or hybrid search. This property has no affect on vectorization decisions done by modules

indexRangeFiltersboolean nullable

Whether to include this property in the filterable, range-based Roaring Bitmap index. Provides better performance for range queries compared to filterable index in large datasets. Applicable only to properties of data type int, number, date.

tokenization'word' | 'lowercase' | 'whitespace' | 'field' | 'trigram' | 'gse' | 'kagome_kr' | 'kagome_ja' | 'gse_ch'

Determines how a property is indexed. This setting applies to text and text[] data types. The following tokenization methods are available:

  • word (default): Splits the text on any non-alphanumeric characters and lowercases the tokens.
  • lowercase: Splits the text on whitespace and lowercases the tokens.
  • whitespace: Splits the text on whitespace. This tokenization is case-sensitive.
  • field: Indexes the entire property value as a single token after trimming whitespace.
  • trigram: Splits the property into rolling trigrams (three-character sequences).
  • gse: Uses the gse tokenizer, suitable for Chinese language text. See gse docs.
  • kagome_ja: Uses the Kagome tokenizer with a Japanese (IPA) dictionary. See kagome docs.
  • kagome_kr: Uses the Kagome tokenizer with a Korean dictionary. See kagome docs.

See Reference: Tokenization for details.

disableDuplicatedReferencesboolean nullable

If set to false, allows multiple references to the same target object within this property. Setting it to true will enforce uniqueness of references within this property. By default, this is set to true.

Changes

No recorded changes to this operation across all 1 revision of this API.