Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.3.10 to 2.4.0. - [Release notes](https://github.com/blevesearch/bleve/releases) - [Commits](https://github.com/blevesearch/bleve/compare/v2.3.10...v2.4.0) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
31 lines
773 B
Go
31 lines
773 B
Go
// Package faiss provides bindings to Faiss, a library for vector similarity
|
|
// search.
|
|
// More detailed documentation can be found at the Faiss wiki:
|
|
// https://github.com/facebookresearch/faiss/wiki.
|
|
package faiss
|
|
|
|
/*
|
|
#cgo LDFLAGS: -lfaiss_c
|
|
|
|
#include <faiss/c_api/Index_c.h>
|
|
#include <faiss/c_api/error_c.h>
|
|
*/
|
|
import "C"
|
|
import "errors"
|
|
|
|
func getLastError() error {
|
|
return errors.New(C.GoString(C.faiss_get_last_error()))
|
|
}
|
|
|
|
// Metric type
|
|
const (
|
|
MetricInnerProduct = C.METRIC_INNER_PRODUCT
|
|
MetricL2 = C.METRIC_L2
|
|
MetricL1 = C.METRIC_L1
|
|
MetricLinf = C.METRIC_Linf
|
|
MetricLp = C.METRIC_Lp
|
|
MetricCanberra = C.METRIC_Canberra
|
|
MetricBrayCurtis = C.METRIC_BrayCurtis
|
|
MetricJensenShannon = C.METRIC_JensenShannon
|
|
)
|