Cluster the passages of a search into topics.
POST/api/v1/passage-clusteringsdocuments:search
Runs search (the members of search_passages, and max_passages, how many passages to read, 5000 when left out) and clusters what it finds into a topic tree in the background, as the clustering app does; no LLM answer is asked for. The clustering is answered pending: get_passage_clustering shows its topics when it has completed. Needs Run Document Clustering, View Document Text and View Own Clustering Sessions, and Search Semantic for mode meaning or Search Full Text for mode exact, and at least 4 passages (422 otherwise). The clustering is the caller's own and stays in list_passage_clusterings.
| Scope | documents:search |
| Asynchronous | No |
| MCP tool | create_passage_clustering |
| Portal permissions | run_document_clustering, view_document_text, view_own_clustering_sessions |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
| Content type | Type |
|---|---|
application/json | PassageClusteringCreateInput |
Responses
| Status | Description | Body |
|---|---|---|
201 | Success. | application/json PassageClustering or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
PassageClustering
| Field | Type | Required | Description |
|---|---|---|---|
completed_at | string (date-time) or null | Required | Null until the clustering has completed. |
created_at | string (date-time) or null | Required | |
name | string | Required | The query it clustered, up to 120 characters. |
passage_clustering_id | string | Required | |
passage_count | integer | Required | The passages clustered; 0 until completed. ≥ -2147483648; ≤ 2147483647 |
query | string or null | Required | The search that was clustered; null until completed, and for an Oliver search result without a query. |
search_mode | string or null | Required | meaning or exact; null until completed. |
status | string | Required | pending, running, completed or failed. failed means the clustering ended without topics (the model found nothing to cluster, or the job raised); make another. A clustering still pending or running long after it was made was lost with its worker. |
topics | array of PassageTopic | Required | The topic tree; empty until completed. |
PassageClusteringCreateInput
| Field | Type | Required | Description |
|---|---|---|---|
search | PassageClusteringSearchInput | Required | The search whose passages to cluster. |
PassageClusteringSearchInput
| Field | Type | Required | Description |
|---|---|---|---|
filter | object or null | Optional | A tree of and, or, not and {field, op, value} leaves: the fields document_number, document_date, document_type, project, description, image_type, main_document_number, created_by, from_organisation, folder and tag, or custom_field.<custom_field_id> for a register column; ops eq, ne, in, gt, gte, lt, lte, contains, starts_with, ends_with. |
max_passages | integer or null | Optional | How many passages to read and cluster, 5000 when left out. |
mode | string | Required | meaning (the chunks nearest the query's meaning) or exact (the document texts holding the query's words). |
query | string | Required | What to look for: a sentence for meaning, words for exact (words, "exact phrase", OR, -exclude). |
PassageTopic
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Required | topic (a leaf the model found) or cluster (a node that merges topics). |
label | array of string | Required | The topic's keywords. |
parent_topic_id | string or null | Required | The node above it; null for a root. |
passage_count | integer | Required | The passages at or under the node. ≥ -2147483648; ≤ 2147483647 |
representative_passage_ids | array of string | Required | The passages that stand for the topic; read them with list_passages. |
topic_id | string | Required | Names the topic within its clustering; -1 is the model's outlier topic. |