Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow SearchService Update By Id

From Leeroopedia
Knowledge Sources
Domains RAG, Search
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete tool for updating search application configuration including KB linking and retrieval parameters provided by RAGFlow SearchService.

Description

Uses SearchService.update_by_id via the POST /search/update endpoint. The search_config dict is deep-merged with existing configuration, allowing partial updates.

Usage

Called via REST API to configure KB links, retrieval parameters, and LLM settings.

Code Reference

Source Location

  • Repository: ragflow
  • File: api/apps/search_app.py (L64-118)

Signature

@manager.route('/update', methods=['POST'])
@login_required
async def update():
    """Update search application.
    Body: {
        search_id: str,
        name: str,
        search_config: {
            kb_ids: list[str],
            vector_similarity_weight: float,
            similarity_threshold: float,
            top_k: int,
            use_rerank: bool,
            rerank_id: str,
            summary: bool,
            chat_id: str,
            llm_setting: dict,
            related_search: bool,
            query_mindmap: bool,
            meta_data_filter: dict
        }
    }
    """

Import

from api.db.services.search_service import SearchService

I/O Contract

Inputs

Name Type Required Description
search_id str Yes Search app ID
name str Yes App name
search_config dict Yes Configuration (deep-merged)

Outputs

Name Type Description
search_app dict Updated search application

Usage Examples

import requests

url = "http://localhost:9380/search/update"
payload = {
    "search_id": "search-uuid-123",
    "name": "Product Search",
    "search_config": {
        "kb_ids": ["kb-uuid-1"],
        "vector_similarity_weight": 0.3,
        "related_search": True,
        "query_mindmap": True
    }
}
requests.post(url, json=payload, headers=headers)

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment