/v0/search/searchDocumentCollectionSearch Document CollectionSearch across all documents in a document collection using the document metadata and contents.
Request body
application/json
collectionIdstring · uuidrequiredmetadataFilterExpressionstringLegacy metadata filter expression to apply to the search query. Use structuredQueryFilters instead.
searchOptionsobjectShow child attributes
enableQueryExtractionboolean/ Whether to extract search terms from the user query and use them for semantic search. Defaults to false.
enableRerankingbooleanWhether to rerank the search results after the initial semantic search query. Defaults to false.
enableSmartFilteringbooleanWhether to automatically filter the search results based on the user query and available metadata on the collection. Defaults to false.
maxChunksintegerThe maximum number of chunks to return. Defaults to 10.
mergeContentsbooleanWhether to merge the chunks for a document and just return one result per document. Defaults to false.
thresholdnumber · doubleThe similarity threshold between 0 and 1 for the search results. A higher number leads to fewer but more relevant results. Defaults to 0.45.
searchQuerystringrequiredstructuredQueryFiltersarray of objectThe structured query filters to apply to the search query.
Show child attributes
Show array items
fieldstringrequiredoperatorstringrequiredvaluestringrequireduserEmailstringrequiredThe email of the user making the search request for permissions reduction.
{
"collectionId": "00000000-0000-0000-0000-000000000000",
"metadataFilterExpression": "string",
"searchOptions": {
"enableQueryExtraction": true,
"enableReranking": true,
"enableSmartFiltering": true,
"maxChunks": 0,
"mergeContents": true,
"threshold": 0
},
"searchQuery": "string",
"structuredQueryFilters": [
{
"field": "string",
"operator": "!=",
"value": "string"
}
],
"userEmail": "string"
}Responses
SearchDocumentCollectionResponse
resultsarray of objectrequiredShow child attributes
Show array items
chunksarray of objectrequiredShow child attributes
Show array items
chunkIdstring · uuidrequiredchunkIndexintegerrequiredscorenumber · doublerequiredThe similarity score between 0 and 1 for the search result. A higher number means the chunk is more relevant to the search query.
textstringrequireddocumentExternalIdstringrequireddocumentIdstring · uuidrequireddocumentMetadataobjectrequireddocumentNamestringrequireddocumentUrlstringrequiredmergedContentsstringsearchIdstring · uuidrequiredsearchTermsUsedarray of stringrequiredShow child attributes
structuredFiltersAppliedarray of objectrequiredShow child attributes
{
"results": [
{
"chunks": [
{
"chunkId": "00000000-0000-0000-0000-000000000000",
"chunkIndex": 0,
"score": 0,
"text": "string"
}
],
"documentExternalId": "string",
"documentId": "00000000-0000-0000-0000-000000000000",
"documentMetadata": {
"additionalProp1": "string"
},
"documentName": "string",
"documentUrl": "string",
"mergedContents": "string"
}
],
"searchId": "00000000-0000-0000-0000-000000000000",
"searchTermsUsed": [
"string"
],
"structuredFiltersApplied": [
{
"field": "string",
"operator": "!=",
"value": "string"
}
]
}