Search R2R

POST

Perform a search query against vector and/or graph-based databases.

Search Modes:

  • basic: Defaults to semantic search. Simple and easy to use.
  • advanced: Combines semantic search with full-text search for more comprehensive results.
  • custom: Complete control over how search is performed. Provide a full SearchSettings object.

Filters: Apply filters directly inside search_settings.filters. For example:

1{
2 "filters": { "document_id": { "$eq": "3e157b3a-..." } }
3}

Supported operators: $eq, $neq, $gt, $gte, $lt, $lte, $like, $ilike, $in, $nin.

Limit: Control how many results you get by specifying limit inside search_settings. For example:

1{
2 "limit": 20
3}

Examples:

  • Using basic mode and no overrides: Just specify search_mode="basic".
  • Using advanced mode and applying a filter: Specify search_mode="advanced" and include search_settings={"filters": {...}, "limit": 5} to override defaults.
  • Using custom mode: Provide the entire search_settings to define your search exactly as you want it.

Request

This endpoint expects an object.
querystringRequired

Search query to find relevant documents

search_modeenumOptional
Allowed values: basicadvancedcustom

Default value of custom allows full control over search settings.

Pre-configured search modes: basic: A simple semantic-based search. advanced: A more powerful hybrid search combining semantic and full-text. custom: Full control via search_settings.

If filters or limit are provided alongside basic or advanced, they will override the default settings for that mode.

search_settingsobjectOptional

The search configuration object. If search_mode is custom, these settings are used as-is. For basic or advanced, these settings will override the default mode configuration.

Common overrides include filters to narrow results and limit to control how many results are returned.

Response

Successful Response

resultsobject

Errors