Create Indexing
This method allows you to trigger an indexing for a knowledge base index.
As part of an indexing, all data sources linked to the knowledge base of the index are crawled, and any previously-unseed documents are downloaded, they are added to the index, and are subsequently processed. Any documents that have been previously added to an index and that are no-longer available in the data source are removed from the index.
As part of processing a document, the system extracts and embeds chunks, as configured for the index. Once a document has been processed and its metadata and chunks have been stored, the original, downloaded document is removed from memory and storage (the original files remain on the data source are never modified or deleted).
Depending on the number of documents, an indexing can take a significant amount of time. An indexing is considered complete once all documents from a data source been crawled, once all discovered documents have been processed fully, and once any document removed from the data source has been removed from the index.
Note that you can only trigger an indexing for an index of a knowledge base index
that was created with data_origin_type=DATA_SOURCES. For any other type of
index, an indexing is triggered automatically when documents are uploaded to
the index via the API. For details, refer to the method to Add a document to
an index.
Note that you can only run one indexing per index at any point in time. If an indexing is currently running when you create a new one, the newly created indexing will be queued until the running indexing completes. If an indexing is already queued, creating another indexing will result in an error (as there is no need to queue a second indexing).
knowledge_base_id
index_id
Successful Response
{
"id": "string",
"created_at": 0,
"knowledge_base_id": "string",
"index_id": "string",
"completed_at": 0
}
ID of the indexing.
State of the indexing.
Unix timestamp (in seconds) when the indexing was created.
The ID of the knowledge base that is being indexed.
The ID of the index that is being indexed.
Unix timestamp (in seconds) when the indexing completed.
Creation of indexing for knowledge base with local files not allowed.
Invalid knowledge base or index ID.
An active Indexing already exists for this knowledge base ID.
Validation Error
"HTTPValidationError Object"
detail
curl -X POST -H 'Authorization: <value>' https://{api_host}/api/v1/control/knowledge-bases/{knowledge_base_id}/indexes/{index_id}/indexings