mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
## Summary Knowledge Graph search functions for entity, relation, community report, and type-samples retrieval. Uses DocEngine.SelectFields (PR #15684) for KG-specific fields. ### Functions | Function | Description | |----------|-------------| | `SearchKGEntities` | Hybrid search over KG entities (dense + text + fusion) | | `SearchKGEntitiesByTypes` | Entity search filtered by `entity_type_kwd` | | `SearchKGRelations` | Hybrid search over KG relations | | `SearchKGCommunityReports` | Community report search by entity names | | `SearchKGTypeSamples` | Type→entities mapping for query_rewrite | ### Internal helpers | Helper | Description | |--------|-------------| | `buildHybridExpr` | Shared dense+text+fusion expression construction | | `buildKGDenseExpr` | Wraps `Embed()` call for vector search | | `Parse*` | Convert raw chunks to typed structs | ### Testing 35 tests (pure function + mock integration) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>