mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-11 05:48:31 +02:00
This commit both: - Fixes pre-existing mistakes in snippets, aka wrong code samples. - Adds hidden (`@hide`) statements that do not appear in the docs, but satisfy typecheckers.
17 lines
495 B
Python
17 lines
495 B
Python
from qdrant_client import QdrantClient, models
|
|
|
|
client = QdrantClient(url="http://localhost:6333")
|
|
|
|
client.create_payload_index(
|
|
collection_name="{collection_name}",
|
|
field_name="name_of_the_field_to_index",
|
|
field_schema=models.TextIndexParams(
|
|
type=models.TextIndexType.TEXT,
|
|
tokenizer=models.TokenizerType.WORD,
|
|
stemmer=models.SnowballParams(
|
|
type=models.Snowball.SNOWBALL,
|
|
language=models.SnowballLanguage.ENGLISH
|
|
)
|
|
),
|
|
)
|