Zhen Ye c6dcef7b84
enhance: move segcore codes of segment into one package (#37722)
issue: #33285

- move most cgo opeartions related to search/query into segcore package
for reusing for streamingnode.
- add go unittest for segcore operations.

Signed-off-by: chyezh <chyezh@outlook.com>
2024-11-29 10:22:36 +08:00

22 lines
411 B
Go

package segments
import "github.com/milvus-io/milvus/internal/util/segcore"
type (
SearchRequest = segcore.SearchRequest
SearchResult = segcore.SearchResult
SearchPlan = segcore.SearchPlan
RetrievePlan = segcore.RetrievePlan
)
func DeleteSearchResults(results []*SearchResult) {
if len(results) == 0 {
return
}
for _, result := range results {
if result != nil {
result.Release()
}
}
}