@@ -70,6 +70,14 @@ func (o *OptimizeVR) Finish() error {
7070
7171 defer o .invokeSearcherEndCallback ()
7272
73+ var interpretVectorIndexOptions * segment_api.InterpretVectorIndexOptions
74+ if BleveVectorSearchBatchExecution {
75+ interpretVectorIndexOptions = & segment_api.InterpretVectorIndexOptions {
76+ Batch : BleveVectorSearchBatchExecution ,
77+ BatchExecutionDelay : BleveVectorSearchBatchExecutionDelay ,
78+ }
79+ }
80+
7381 wg := sync.WaitGroup {}
7482 semaphore := make (chan struct {}, BleveMaxKNNConcurrency )
7583 // Launch goroutines to get vector index for each segment
@@ -84,11 +92,7 @@ func (o *OptimizeVR) Finish() error {
8492 }()
8593 for field , vrs := range o .vrs {
8694 vecIndex , err := segment .InterpretVectorIndex (field ,
87- o .requiresFiltering , origSeg .deleted ,
88- segment_api.InterpretVectorIndexOptions {
89- Batch : BleveVectorSearchBatchExecution ,
90- BatchExecutionDelay : BleveVectorSearchBatchExecutionDelay ,
91- })
95+ o .requiresFiltering , origSeg .deleted , interpretVectorIndexOptions )
9296 if err != nil {
9397 errorsM .Lock ()
9498 errors = append (errors , err )
0 commit comments