younifyd
Menu

Add a property to a collection

Add a property to a collection

POST/v1/schema/{className}/properties

Use it in a workflow

  1. Add a step and choose the Weaviate connector.
  2. Pick the Add a property to a collection action (under schema).
  3. Fill in the fields below, then reference the result from later steps as {{addAPropertyToACollection.response.data}}.

Request

Path parameters

classNamestringrequired

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

Request body

Enter the body as JSON in the step's Body field.

dataTypearray<string>

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

(Deprecated). Whether to include this property in the inverted index. If `false`, this property cannot be used in `where` filters, `bm25` or `hybrid` search. <br/><br/>Unrelated to vectorization behavior (deprecated as of v1.19; use indexFilterable or/and indexSearchable instead)

bucketGenerationinteger (int64)

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

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

Whether to include this property in the filterable, Roaring Bitmap index. If `false`, this property cannot be used in `where` filters. <br/><br/>Note: Unrelated to vectorization behavior.

indexSearchableboolean

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

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.

tokenizationstring

Determines how a property is indexed. This setting applies to `text` and `text[]` data types. The following tokenization methods are available:<br/><br/>- `word` (default): Splits the text on any non-alphanumeric characters and lowercases the tokens.<br/>- `lowercase`: Splits the text on whitespace and lowercases the tokens.<br/>- `whitespace`: Splits the text on whitespace. This tokenization is case-sensitive.<br/>- `field`: Indexes the entire property value as a single token after trimming whitespace.<br/>- `trigram`: Splits the property into rolling trigrams (three-character sequences).<br/>- `gse`: Uses the `gse` tokenizer, suitable for Chinese language text. [See `gse` docs](https://pkg.go.dev/github.com/go-ego/gse#section-readme).<br/>- `kagome_ja`: Uses the `Kagome` tokenizer with a Japanese (IPA) dictionary. [See `kagome` docs](https://github.com/ikawaha/kagome).<br/>- `kagome_kr`: Uses the `Kagome` tokenizer with a Korean dictionary. [See `kagome` docs](https://github.com/ikawaha/kagome).<br/><br/>See [Reference: Tokenization](https://docs.weaviate.io/weaviate/config-refs/collections#tokenization) for details.

One ofwordlowercasewhitespacefieldtrigramgsekagome_krkagome_jagse_ch

nestedPropertiesarray<object>

The properties of the nested object(s). Applies to object and object[] data types.

dataTypearray<string>
descriptionstring
namestring
indexFilterableboolean
indexSearchableboolean
indexRangeFiltersboolean
tokenizationstring

One ofwordlowercasewhitespacefieldtrigramgsekagome_krkagome_jagse_ch

nestedPropertiesarray<object>

The properties of the nested object(s). Applies to object and object[] data types.

textAnalyzerobject3 fields

Text analysis options for a property. These settings are immutable after the property is created. Applies only to text and text[] data types that use an inverted index (searchable or filterable).

disableDuplicatedReferencesboolean

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.

Default true

textAnalyzerobject

Text analysis options for a property. These settings are immutable after the property is created. Applies only to text and text[] data types that use an inverted index (searchable or filterable).

asciiFoldboolean

If true, accent/diacritic marks are folded to their base characters during indexing and search. For example, 'école' matches 'ecole'. Defaults to false.

asciiFoldIgnorearray<string>

If provided, specifies a list of characters that should be excluded from ascii folding. For example, if ['é'] is provided, then 'é' will not be folded to 'e' during indexing and search. This list is immutable after the property is created.

stopwordPresetstring

Stopword preset name. Overrides the collection-level invertedIndexConfig.stopwords for this property. Only applies to properties using 'word' tokenization. Can be a built-in preset ('en', 'none') or a user-defined preset from invertedIndexConfig.stopwordPresets.

json
{
  "dataType": [
    "string"
  ],
  "description": "string",
  "moduleConfig": {},
  "name": "string",
  "indexInverted": false,
  "bucketGeneration": 0,
  "searchableBlockmax": false,
  "indexFilterable": false,
  "indexSearchable": false,
  "indexRangeFilters": false,
  "tokenization": "word",
  "nestedProperties": [
    {
      "dataType": [
        "string"
      ],
      "description": "string",
      "name": "string",
      "indexFilterable": false,
      "indexSearchable": false,
      "indexRangeFilters": false,
      "tokenization": "word",
      "nestedProperties": [
        {}
      ],
      "textAnalyzer": {
        "asciiFold": false,
        "asciiFoldIgnore": [
          "string"
        ],
        "stopwordPreset": "string"
      }
    }
  ]
}

Response

Returns 200 with a any. Read it in later steps with {{addAPropertyToACollection.response.data.<field>}}.

Need more? See the Weaviate guide for connection setup and behaviour shared by every action.