RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
package handler
import (
"strings"
"ragflow/internal/common"
"github.com/gin-gonic/gin"
)
// ApplyDatasetParserConfig handles POST /api/v1/datasets/:dataset_id/documents/apply-parser-config.
func (h *DocumentHandler) ApplyDatasetParserConfig(c *gin.Context) {
_, code, message := GetUser(c)
if code != common.CodeSuccess {
common.RespondError(c, code, message)
return
}
datasetID := strings.TrimSpace(c.Param("dataset_id"))
if datasetID == "" {
common.RespondError(c, common.CodeArgumentError, "dataset_id is required")
return
}
result, code, err := h.documentService.ApplyDatasetParserConfig(c.Request.Context(), datasetID)
if err != nil {
common.RespondError(c, code, err.Error())
return
}
common.RespondSuccess(c, result, "Parser settings applied. Re-parse files manually to update their content.")
}