Full Text Search
Perform full text search for exact matches within your indexed sources or memories. Choose between ‘OR’ and ‘AND’ operators to control how search terms are combined for precise text matching.
Use search_mode to specify what to search:
- “sources” (default): Search over indexed documents
- “memories”: Search over user memories
Examples
- API Request
- TypeScript
- Python (Sync)
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
Unique identifier for the tenant/organization
"tenant_1234"
Search terms to find in your content
"John Smith Jake"
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 "and"
Maximum number of results to return
1
What to search: 'sources' for documents or 'memories' for user memories
sources, memories