Collections
Creates a collection with its initial settings, or confirms it already exists.#
/lmkit/v1/search/collectionsEnsures a collection exists. How it is searched (full-text / semantic), the embedding model, OCR, and text normalization are tenant-level settings shared by every collection; a collection only carries its display name and full-text language. Idempotent: returns 201 Created when the collection is newly created and 200 OK when it already exists (its settings are left untouched). Use PUT to change an existing collection's settings.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
cluster_id | string | The search cluster that holds the tenant and collection. If not provided, the default cluster is used. |
tenant_idrequired | string (uuid) | The tenant that owns the collection. |
collection_idrequired | string (uuid) | The collection to configure. |
display_name | string | Optional human-readable name for the collection, shown in the admin console and returned with collection listings. The collection is still addressed by its id. Omit it, or send a blank value, to leave any existing name unchanged: a blank value never clears a name, so re-running create or re-sending settings cannot wipe a name a previous call set. Send a real value to set or rename it. |
languages | [] | Optional list of languages present in the collection's documents. It improves word-based search with language-aware stemming. A single language applies that language's text-search configuration; multiple languages, or languages without a dedicated configuration, use language-neutral matching. Omit it (or use ['Undefined']) for language-neutral matching. When updating, omitting it keeps the current value. |
bm25_b | object (double) | Full-text length normalization for this collection, from 0 (ignore document length) to 1 (fully normalize by it). Omit to inherit the server setting. Lower it for a corpus whose relevant documents are inherently long, such as arguments, legal texts or full papers: the default penalizes length, which suits short focused answers and costs recall on long ones. Ranking-only, so a change takes effect immediately with no re-indexing. |
fusion_semantic_share | object (double) | Share of hybrid fusion given to the semantic arm for this collection, from 0 (lexical only) to 1 (semantic only). Omit to inherit the server default. Lower it for a collection whose lexical arm is the stronger one: the default favors semantic, which suits most corpora and suppresses the lexical arm on the ones it does not. Ranking-only, so a change takes effect immediately with no re-indexing. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 400 | Bad Request | |
| 404 | Not Found | |
| 503 | Service Unavailable |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/search/collections" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cluster_id": "string",
"tenant_id": "string",
"collection_id": "string",
"display_name": "string",
"languages": [
"Undefined"
],
"bm25_b": "string"
}'Updates an existing collection's settings.#
/lmkit/v1/search/collectionsChanges a collection's display name and full-text language. Search mode, the embedding model, OCR, and text normalization are tenant-level settings (set on the tenant). Fails with 404 Not Found if the collection does not exist; use POST to create it. The language is optional; omit it to keep the current value. A language change is applied to existing documents in the background; track progress with the reindex endpoint.
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
cluster_id | string | The search cluster that holds the tenant and collection. If not provided, the default cluster is used. |
tenant_idrequired | string (uuid) | The tenant that owns the collection. |
collection_idrequired | string (uuid) | The collection to configure. |
display_name | string | Optional human-readable name for the collection, shown in the admin console and returned with collection listings. The collection is still addressed by its id. Omit it, or send a blank value, to leave any existing name unchanged: a blank value never clears a name, so re-running create or re-sending settings cannot wipe a name a previous call set. Send a real value to set or rename it. |
languages | [] | Optional list of languages present in the collection's documents. It improves word-based search with language-aware stemming. A single language applies that language's text-search configuration; multiple languages, or languages without a dedicated configuration, use language-neutral matching. Omit it (or use ['Undefined']) for language-neutral matching. When updating, omitting it keeps the current value. |
bm25_b | object (double) | Full-text length normalization for this collection, from 0 (ignore document length) to 1 (fully normalize by it). Omit to inherit the server setting. Lower it for a corpus whose relevant documents are inherently long, such as arguments, legal texts or full papers: the default penalizes length, which suits short focused answers and costs recall on long ones. Ranking-only, so a change takes effect immediately with no re-indexing. |
fusion_semantic_share | object (double) | Share of hybrid fusion given to the semantic arm for this collection, from 0 (lexical only) to 1 (semantic only). Omit to inherit the server default. Lower it for a collection whose lexical arm is the stronger one: the default favors semantic, which suits most corpora and suppresses the lexical arm on the ones it does not. Ranking-only, so a change takes effect immediately with no re-indexing. |
Responses
| Status | Type | Description |
|---|---|---|
| 204 | No Content | |
| 400 | Bad Request | |
| 404 | Not Found | |
| 503 | Service Unavailable |
curl -X PUT "$LMKIT_ONE_URL/lmkit/v1/search/collections" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cluster_id": "string",
"tenant_id": "string",
"collection_id": "string",
"display_name": "string",
"languages": [
"Undefined"
],
"bm25_b": "string"
}'Returns the progress of applying a collection's settings change.#
/lmkit/v1/search/clusters/{clusterId}/tenants/{tenantId}/collections/{collectionId}/reindexReports how much of a recent settings change has been applied to documents already in the collection. When you change a collection's embedding model or language, the change is applied to existing documents in the background; this endpoint reports how many documents are still pending, reaching zero when the change is fully applied. Search keeps working throughout.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
clusterIdrequired | path | string | |
tenantIdrequired | path | string (uuid) | |
collectionIdrequired | path | string (uuid) |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 404 | Not Found | |
| 503 | application/json | Service Unavailable |
curl -X GET "$LMKIT_ONE_URL/lmkit/v1/search/clusters/$CLUSTERID/tenants/$TENANTID/collections/$COLLECTIONID/reindex" \
-H "Authorization: Bearer $LMKIT_API_KEY"