Skip to main content
POST
/
api
/
r2r
/
v3
/
retrieval
/
search
Search R2R
curl --request POST \
  --url https://api.intelligence.io.solutions/api/r2r/v3/retrieval/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "<string>",
  "search_mode": "basic",
  "search_settings": {
    "use_hybrid_search": false,
    "use_semantic_search": true,
    "use_fulltext_search": false,
    "filters": "<string>",
    "limit": 10,
    "offset": "0",
    "include_metadatas": true,
    "include_scores": true,
    "search_strategy": "vanilla",
    "hybrid_settings": {
      "full_text_weight": 1,
      "semantic_weight": 5,
      "full_text_limit": 200,
      "rrf_k": 50
    },
    "chunk_settings": {
      "index_measure": "l2_distance",
      "probes": 10,
      "ef_search": 40,
      "enabled": true
    },
    "graph_settings": {
      "limits": [
        "<any>"
      ],
      "enabled": true
    },
    "num_sub_queries": 5
  }
}'
{
  "results": {
    "chunk_search_results": [
      {
        "id": "3f3d47f3-8baf-58eb-8bc2-0171fb1c6e09",
        "document_id": "3e157b3a-8469-51db-90d9-52e7d896b49b",
        "collection_ids": [
          "collection_ids"
        ],
        "text": "Example text from the document",
        "metadata": {
          "associated_query": "What is the capital of France?",
          "title": "example_document.pdf"
        },
        "owner_id": "2acb499e-8428-543b-bd85-0d9098718220",
        "score": 0.23943702876567796
      }
    ],
    "graph_search_results": [
      {
        "content": {
          "id": "3f3d47f3-8baf-58eb-8bc2-0171fb1c6e09",
          "name": "Entity Name",
          "description": "Entity Description",
          "metadata": {
            "key": "value"
          }
        },
        "id": "id",
        "result_type": "entity",
        "chunk_ids": [
          "c68dc72e-fc23-5452-8f49-d7bd46088a96"
        ],
        "metadata": {
          "associated_query": "What is the capital of France?"
        }
      }
    ],
    "web_search_results": [
      {
        "position": 1,
        "id": "id",
        "title": "Page Title",
        "link": "https://example.com/page",
        "snippet": "Page snippet",
        "date": "2021-01-01",
        "sitelinks": [
          {
            "link": "https://example.com/sitelink",
            "title": "Sitelink Title"
          }
        ]
      }
    ],
    "document_search_results": [
      {
        "id": "id",
        "collection_ids": [
          "collection_ids"
        ],
        "owner_id": "owner_id",
        "document_type": "mp3",
        "metadata": {
          "key": "value"
        },
        "version": "version"
      }
    ]
  }
}
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:
{
"filters": {"document_id": {"$eq": "e43864f5-a36f-548e-aacd-6f8d48b30c7f"}}
}
Supported operators: $eq, $neq, $gt, $gte, $lt, $lte, $like, $ilike, $in, $nin. Hybrid Search: Enable hybrid search by setting use_hybrid_search: true in search_settings. This combines semantic search with keyword-based search for improved results. Configure with hybrid_settings:
{
"use_hybrid_search": true,
"hybrid_settings": {
    "full_text_weight": 1.0,
    "semantic_weight": 5.0,
    "full_text_limit": 200,
    "rrf_k": 50
}
}
Graph-Enhanced Search: Knowledge graph integration is enabled by default. Control with graph_search_settings:
{
"graph_search_settings": {
    "use_graph_search": true,
    "kg_search_type": "local"
}
}
Advanced Filtering: Use complex filters to narrow down results by metadata fields or document properties:
{
"filters": {
    "$and":[
        {"document_type": {"$eq": "pdf"}},
        {"metadata.year": {"$gt": 2020}}
    ]
}
}
Results: The response includes vector search results and optional graph search results. Each result contains the matched text, document ID, and relevance score.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
query
string

The search query text

search_mode
enum<string>

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.ID of the collection to search in

Available options:
basic,
advanced,
custom
search_settings
object

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

200

results
object
I