mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-17 22:08:29 +08:00
Add OceanBase and SeekDB Go document engine (#17780)
## What changed - add an OceanBase/SeekDB Go document engine using `database/sql` and the existing MySQL driver - preserve the Python connector's configuration, physical table names, schema, index names, and ARRAY/JSON/VECTOR encodings - implement chunk, memory, document metadata, skill, SQL, full-text, vector, and fusion search paths - support `DBMS_HYBRID_SEARCH.SEARCH` behind the existing feature flag, with SQL fallback only when the package is unavailable - wire the engine into retrieval, memory, metadata, vector hydration, and SQL chat flows - add Python/Go compatibility contracts, SQL mock tests, and an integration-tagged round-trip test --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -32,6 +32,8 @@ type EngineType string
|
||||
const (
|
||||
EngineElasticsearch EngineType = "elasticsearch"
|
||||
EngineInfinity EngineType = "infinity"
|
||||
EngineOceanBase EngineType = "oceanbase"
|
||||
EngineSeekDB EngineType = "seekdb"
|
||||
EngineSereneDB EngineType = "serenedb"
|
||||
)
|
||||
|
||||
@@ -94,10 +96,16 @@ type DocEngine interface {
|
||||
// Type returns the engine type (helper method for runtime type checking)
|
||||
// This is a workaround since we can't import elasticsearch or infinity packages directly
|
||||
func Type(docEngine DocEngine) EngineType {
|
||||
// Type checking through interface methods is not straightforward
|
||||
// This is a placeholder that should be implemented differently
|
||||
// or rely on configuration to know the type
|
||||
return EngineType("unknown")
|
||||
if docEngine == nil {
|
||||
return EngineType("unknown")
|
||||
}
|
||||
return EngineType(docEngine.GetType())
|
||||
}
|
||||
|
||||
// IsOceanBaseFamily reports whether a configured engine uses the shared
|
||||
// OceanBase/SeekDB SQL implementation.
|
||||
func IsOceanBaseFamily(engineName string) bool {
|
||||
return engineName == string(EngineOceanBase) || engineName == string(EngineSeekDB)
|
||||
}
|
||||
|
||||
type MessageQueue interface {
|
||||
|
||||
Reference in New Issue
Block a user