Skip to content

Commit

Permalink
introducing context for the vectorOptimize API (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thejas-bhat authored Feb 2, 2024
1 parent 54ca226 commit 3681af8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vector_optimize.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package index

import "context"

// VectorOptimizable represents an optional interface that implementable by
// optimizable resources (e.g., VectorReaders, Searchers). These
// optimizable resources are provided the same OptimizableContext
Expand All @@ -25,7 +27,7 @@ package index
// To avoid KNNSearchers' OptimizableContext being casted to ones used for
// TFRs, term searchers, etc.
type VectorOptimizable interface {
VectorOptimize(octx VectorOptimizableContext) (VectorOptimizableContext, error)
VectorOptimize(ctx context.Context, octx VectorOptimizableContext) (VectorOptimizableContext, error)
}

type VectorOptimizableContext interface {
Expand Down

0 comments on commit 3681af8

Please # to comment.