---
title: "Create index for field in collection"
method: PUT
path: "/collections/{collection_name}/index"
tags: ["Indexes"]
---

# Create index for field in collection

`PUT /collections/{collection_name}/index`

Create index for field in collection

## Path parameters

- `collection_name` string, required

## Query parameters

- `wait` boolean
- `ordering` 'weak' | 'medium' | 'strong' — Defines write ordering guarantees for collection operations * `weak` - write operations may be reordered, works faster, default * `medium` - write operations go through dynamically selected leader, may be inconsistent for a short period of time in case of leader change * `strong` - Write operations go through the permanent leader, consistent, but may be unavailable if leader is down

## Request body

- CreateFieldIndex
  - `field_name` string, required
  - `field_schema` union
    - union
      - 'keyword' | 'integer' | 'float' | 'geo' | 'text' | 'bool' | 'datetime' | 'uuid' — All possible names of payload types
      - union — Payload type with parameters
        - KeywordIndexParams
          - `type` 'keyword', required
          - `is_tenant` boolean, nullable — If true - used for tenant optimization. Default: false.
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
        - IntegerIndexParams
          - `type` 'integer', required
          - `lookup` boolean, nullable — If true - support direct lookups. Default is true.
          - `range` boolean, nullable — If true - support ranges filters. Default is true.
          - `is_principal` boolean, nullable — If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests. Default is false.
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false. Default is false.
        - FloatIndexParams
          - `type` 'float', required
          - `is_principal` boolean, nullable — If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
        - GeoIndexParams
          - `type` 'geo', required
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
        - TextIndexParams
          - `type` 'text', required
          - `tokenizer` 'prefix' | 'whitespace' | 'word' | 'multilingual'
          - `min_token_len` integer, nullable — Minimum characters to be tokenized.
          - `max_token_len` integer, nullable — Maximum characters to be tokenized.
          - `lowercase` boolean, nullable — If true, lowercase all tokens. Default: true.
          - `ascii_folding` boolean, nullable — If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default: false.
          - `phrase_matching` boolean, nullable — If true, support phrase matching. Default: false.
          - `stopwords` union — Ignore this set of tokens. Can select from predefined languages and/or provide a custom set.
            - union
              - …
            - unknown
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
          - `stemmer` union — Algorithm for stemming. Default: disabled.
            - StemmingAlgorithm
              - …
            - unknown
        - BoolIndexParams
          - `type` 'bool', required
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
        - DatetimeIndexParams
          - `type` 'datetime', required
          - `is_principal` boolean, nullable — If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
        - UuidIndexParams
          - `type` 'uuid', required
          - `is_tenant` boolean, nullable — If true - used for tenant optimization.
          - `on_disk` boolean, nullable — If true, store the index on disk. Default: false.
    - unknown

## Response `200`

successful operation

- object
  - `usage` union
    - Usage — Usage of the hardware resources, spent to process the request
      - `hardware` union
        - HardwareUsage — Usage of the hardware resources, spent to process the request
          - `cpu` integer, required
          - `payload_io_read` integer, required
          - `payload_io_write` integer, required
          - `payload_index_io_read` integer, required
          - `payload_index_io_write` integer, required
          - `vector_io_read` integer, required
          - `vector_io_write` integer, required
        - unknown
      - `inference` union
        - InferenceUsage
          - `models` object, required
        - unknown
    - unknown
  - `time` number, float — Time spent to process this request
  - `status` string
  - `result` UpdateResult
    - `operation_id` integer, nullable — Sequential number of the operation
    - `status` 'acknowledged' | 'completed', required — `Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.

## Other responses

- `default` — error
- `4XX` — error

## Changes

- **2025-11-17** `d09f337ca2f3` — 3 info
  - added the new optional request property `field_schema/anyOf[#/components/schemas/PayloadFieldSchema]/anyOf[#/components/schemas/PayloadSchemaParams]/anyOf[#/components/schemas/TextIndexParams]/ascii_folding`
  - added `#/components/schemas/Usage` to the `usage` response property `anyOf` list for the response status `200`
  - removed `#/components/schemas/HardwareUsage` from the `usage` response property `anyOf` list for the response status `200`
- **2025-07-18** `172ce7556b1f` — 3 info
  - added the new optional request property `field_schema/anyOf[#/components/schemas/PayloadFieldSchema]/anyOf[#/components/schemas/PayloadSchemaParams]/anyOf[#/components/schemas/TextIndexParams]/phrase_matching`
  - added the new optional request property `field_schema/anyOf[#/components/schemas/PayloadFieldSchema]/anyOf[#/components/schemas/PayloadSchemaParams]/anyOf[#/components/schemas/TextIndexParams]/stemmer`
  - added the new optional request property `field_schema/anyOf[#/components/schemas/PayloadFieldSchema]/anyOf[#/components/schemas/PayloadSchemaParams]/anyOf[#/components/schemas/TextIndexParams]/stopwords`
- …earlier changes not shown

[Full history](https://skmtc.dev/qdrant/apis/qdrant-api/changes/collections/:collection_name/index/put.md)

---

[API](https://skmtc.dev/qdrant/apis/qdrant-api.md) · [All operations](https://skmtc.dev/qdrant/apis/qdrant-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qdrant/qdrant-api/revisions/d09f337ca2f3/schema)
