Files
ef31a4afe0 [v1.15.0] Text index documentation (#1698)
* phrase matching documentation

* mention incompatibility with prefix tokenizer

* nvm, it works well

* fix rust snippet

* fix python snippet

* Update qdrant-landing/content/documentation/headless/snippets/create-payload-index/simple-full-text/csharp.md

* [1.15] Text Index Documentation (#1796)

* wip

* add snippets for simple text index creation and phrase index separatelly

* add some stopwords snippets + stopwords description

* add stemmer snippets

* docs: Stemmer, stop words Go snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: Stemmer, stop words Java snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: Stemmer, stop words C# snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* fix: http, TS stemmer snippets

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* docs: Nit fixes indexing.md

Signed-off-by: Anush008 <anushshetty90@gmail.com>

* lowercase stemmer is intended for consistency

---------

Signed-off-by: Anush008 <anushshetty90@gmail.com>
Co-authored-by: Anush008 <anushshetty90@gmail.com>

---------

Signed-off-by: Anush008 <anushshetty90@gmail.com>
Co-authored-by: Anush <anushshetty90@gmail.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2025-07-18 13:24:00 +02:00

640 B

use qdrant_client::qdrant::{
    CreateFieldIndexCollectionBuilder,
    TextIndexParamsBuilder,
    FieldType,
    TokenizerType,
};
use qdrant_client::Qdrant;

let client = Qdrant::from_url("http://localhost:6334").build()?;

let text_index_params = TextIndexParamsBuilder::new(TokenizerType::Word)
    .min_token_len(2)
    .max_token_len(10)
    .lowercase(true);

client
    .create_field_index(
        CreateFieldIndexCollectionBuilder::new(
            "{collection_name}",
            "name_of_the_field_to_index",
            FieldType::Text,
        ).field_index_params(text_index_params.build()),
    )
    .await?;