Reindex Documents
POST /api/discovery/enhanced-search/reindex-documents
POST
/api/discovery/enhanced-search/reindex-documents
Reindex all documents with enhanced embeddings in background task.
Request Body:
model_name: Embedding model reported in the response (default: “multilingual-e5-large-instruct”)force: Force reindexing even if embeddings exist (default: False)
Query Parameters:
force_reindex: Override force flag via query parameterbatch_size: Batch size for reindexing operations (1-1000, default: 100)
Returns:
status: “started”, “skipped”, or “completed”message: Operation status messagedocument_count: Number of documents to be indexedmodel: Embedding model being used
Raises:
- 500: Failed to retrieve documents or start reindexing
Note: Long-running operation executed in background task.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” force_reindex
Force Reindex
boolean
batch_size
Batch Size
integer
Request Body required
Section titled “Request Body required ” ReindexRequest
object
modelName
Modelname
Embedding model identifier reported back in the response. Reindexing always runs against the bundled E5 ONNX runtime.
string
force
Force
Force reindexing even if embeddings exist
boolean
Responses
Section titled “ Responses ”Successful Response
SearchReindexResponse
Search reindex response model.
Provides confirmation and status for document reindexing operations including operation status, document count, and embedding model information for enhanced semantic search.
Fields:
status: Reindex operation status (“started”, “skipped”, “completed”, “error”)message: Human-readable status message describing the operationdocument_count: Number of documents to be indexed or indexed (non-negative integer, optional)model: Embedding model name used for reindexing (optional)
Status Values:
started: Reindexing operation initiated in backgroundskipped: Reindexing skipped (embeddings already exist, use force=true)completed: Reindexing completed successfullyerror: Reindexing encountered an error
Usage: POST /api/discovery/enhanced-search/reindex-documents returns this response model.
JSON Example:
{
"status": "started",
"message": "Reindexing 150 documents in background",
"documentCount": 150,
"model": "multilingual-e5-large-instruct"
}Validation Error
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context