Try it
button to try this API now in our playground. It’s the best way to check the full request and response in one place, customize your parameters, and generate ready-to-use code snippets.Sample Request
Search Options
The Full Text Search endpoint provides various operators and search capabilities to help you find exactly what you’re looking for in your indexed content.Boolean Operators
AND Operator
- Usage:
"operator": "and"
- Behavior: All search terms must be present in the document for it to match
- Best for: Precise searches where you need all keywords to be present
- Example: Searching for “machine learning algorithms” with AND will only return documents containing both “machine” AND “learning” AND “algorithms”
OR Operator
- Usage:
"operator": "or"
- Behavior: At least one search term must be present in the document for it to match
- Best for: Broad searches to find documents containing any of the specified terms
- Example: Searching for “python javascript react” with OR will return documents containing any of these programming languages
Search Optimization Tips
For Better Precision
- Use the AND operator when you need all terms to be present
- Use specific terminology rather than generic terms
For Broader Results
- Use the OR operator to find documents with any of the search terms
- Try synonyms and related terms to expand your search
Response
Returns an array of relevant content chunks from your indexed sources based on the full text search query.
Note: This API performs full text search with configurable operators for precise text matching. For conversational Q&A with AI-generated responses, use the /search/qna
API instead.
Operator Parameter
Theoperator
parameter controls how the search terms are combined:
- OR operator (default): At least one token must be present in the document
- AND operator: All tokens must be present in the document
Max Chunks Parameter
Themax_chunks
parameter controls the maximum number of results returned:
- Must be between 1 and 1001
- Defaults to the system limit if not specified
Use Cases
- Precise keyword matching: Use AND operator when you need all search terms to be present
- Broad search: Use OR operator to find documents containing any of the search terms
- Exact phrase matching: Ideal for finding specific terminology or phrases in your documents
Error Responses
All endpoints return consistent error responses following the standard format. For detailed error information, see our Error Responses documentation.Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Search terms to find in your content
"John Smith Jake"
Unique identifier for the tenant/organization
"tenant_1234"
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
"sub_tenant_4567"
How to combine search terms (OR or AND)
or
, and
Maximum number of results to return
Response
Successful Response
Unique identifier for this content chunk
"<chunk_uuid>"
Unique identifier for the source document
"CortexDoc1234"
The actual text content of this chunk
"<chunk_content>"
Type of the source document (file, webpage, etc.)
"<source_type>"
When the source document was originally uploaded
"<source_upload_time>"
Title or name of the source document
"<source_title>"
When the source document was last modified
"<source_last_updated_time>"
Layout of the chunk in original document. You will generally receive a stringified dict with 2 keys, offsets
and page
(optional). Offsets will have document_level_start_index
and page_level_start_index
(optional)
"{\"offsets\": {\"document_level_start_index\": 1024, \"page_level_start_index\": 50}, \"page\": 2}"
Score indicating how relevant this chunk is to your search query, with higher values indicating better matches
Metadata extracted from the source document
{
"author": "John Doe",
"category": "Internal"
}
Custom metadata associated with your tenant
{ "department": "R&D" }