mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-27 10:52:03 +08:00
Refactor: refactor dataflow_service.go and guard nats message re-delivery (#16826)
### Summary 1. refactor dataflow_service.go 2. guard nats message re-delivery 3. support document parse cancelling & re-run
This commit is contained in:
@@ -105,6 +105,11 @@ func (e *elasticsearchEngine) GetType() string {
|
||||
return "elasticsearch"
|
||||
}
|
||||
|
||||
// SupportsPageRank returns true because Elasticsearch supports pagerank.
|
||||
func (e *elasticsearchEngine) SupportsPageRank() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Ping health check
|
||||
func (e *elasticsearchEngine) Ping(ctx context.Context) error {
|
||||
req := esapi.InfoRequest{}
|
||||
|
||||
@@ -76,6 +76,9 @@ type DocEngine interface {
|
||||
// GetType returns the engine type
|
||||
GetType() string
|
||||
|
||||
// SupportsPageRank reports whether the engine supports dataset-level pagerank.
|
||||
SupportsPageRank() bool
|
||||
|
||||
// FilterDocIdsByMetaPushdown runs a metadata filter directly against
|
||||
// the doc metadata index, returning matching doc IDs or nil if push-down
|
||||
// is not supported (caller should fall back to in-memory filtering).
|
||||
|
||||
@@ -191,6 +191,11 @@ func (e *infinityEngine) GetType() string {
|
||||
return "infinity"
|
||||
}
|
||||
|
||||
// SupportsPageRank returns false because Infinity does not support pagerank.
|
||||
func (e *infinityEngine) SupportsPageRank() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Ping checks if Infinity is accessible
|
||||
func (e *infinityEngine) Ping(ctx context.Context) error {
|
||||
if e.client == nil || e.client.conn == nil {
|
||||
|
||||
@@ -253,3 +253,7 @@ func (m *NatsMessageHandle) Ack() error {
|
||||
func (m *NatsMessageHandle) Nack() error {
|
||||
return m.message.Nak()
|
||||
}
|
||||
|
||||
func (m *NatsMessageHandle) InProgress() error {
|
||||
return m.message.InProgress()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user