mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-03 06:17:29 +08:00
Implement Create/Drop Index/Metadata index in GO (#13791)
### What problem does this PR solve? Implement Create/Drop Index/Metadata index in GO New API handling in GO: POST/kb/index DELETE /kb/index POST /tenant/doc_meta_index DELETE /tenant/doc_meta_index CREATE INDEX FOR DATASET 'dataset_name' VECTOR_SIZE 1024; DROP INDEX FOR DATASET 'dataset_name'; CREATE INDEX DOC_META; DROP INDEX DOC_META; ### Type of change - [x] Refactoring
This commit is contained in:
@@ -42,7 +42,7 @@ type DocEngine interface {
|
||||
Search(ctx context.Context, req interface{}) (interface{}, error)
|
||||
|
||||
// Index operations
|
||||
CreateIndex(ctx context.Context, indexName string, mapping interface{}) error
|
||||
CreateIndex(ctx context.Context, indexName, datasetID string, vectorSize int, parserID string) error
|
||||
DeleteIndex(ctx context.Context, indexName string) error
|
||||
IndexExists(ctx context.Context, indexName string) (bool, error)
|
||||
|
||||
@@ -51,8 +51,11 @@ type DocEngine interface {
|
||||
BulkIndex(ctx context.Context, indexName string, docs []interface{}) (interface{}, error)
|
||||
DeleteDocument(ctx context.Context, indexName, docID string) error
|
||||
|
||||
// Chunk operations
|
||||
GetChunk(ctx context.Context, indexName, chunkID string, kbIDs []string) (interface{}, error)
|
||||
// Chunk operations
|
||||
GetChunk(ctx context.Context, indexName, chunkID string, kbIDs []string) (interface{}, error)
|
||||
|
||||
// Doc metadata index operations (per-tenant)
|
||||
CreateDocMetaIndex(ctx context.Context, indexName string) error
|
||||
|
||||
// Health check
|
||||
Ping(ctx context.Context) error
|
||||
|
||||
Reference in New Issue
Block a user