chore(deps): bump github.com/blevesearch/bleve/v2 from 2.4.2 to 2.4.3
Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.4.2 to 2.4.3. - [Release notes](https://github.com/blevesearch/bleve/releases) - [Commits](https://github.com/blevesearch/bleve/compare/v2.4.2...v2.4.3) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
926bc8e22a
commit
1104846219
+8
@@ -57,6 +57,14 @@ type CopyIndex interface {
|
||||
CopyReader() CopyReader
|
||||
}
|
||||
|
||||
// EventIndex is an optional interface for exposing the support for firing event
|
||||
// callbacks for various events in the index.
|
||||
type EventIndex interface {
|
||||
// FireIndexEvent is used to fire an event callback when Index() is called,
|
||||
// to notify the caller that a document has been added to the index.
|
||||
FireIndexEvent()
|
||||
}
|
||||
|
||||
type IndexReader interface {
|
||||
TermFieldReader(ctx context.Context, term []byte, field string, includeFreq, includeNorm, includeTermVectors bool) (TermFieldReader, error)
|
||||
|
||||
|
||||
+4
-6
@@ -32,12 +32,9 @@ type VectorField interface {
|
||||
const (
|
||||
EuclideanDistance = "l2_norm"
|
||||
|
||||
// dotProduct(vecA, vecB) = vecA . vecB = |vecA| * |vecB| * cos(theta);
|
||||
// where, theta is the angle between vecA and vecB
|
||||
// If vecA and vecB are normalized (unit magnitude), then
|
||||
// vecA . vecB = cos(theta), which is the cosine similarity.
|
||||
// Thus, we don't need a separate similarity type for cosine similarity
|
||||
CosineSimilarity = "dot_product"
|
||||
InnerProduct = "dot_product"
|
||||
|
||||
CosineSimilarity = "cosine"
|
||||
)
|
||||
|
||||
const DefaultSimilarityMetric = EuclideanDistance
|
||||
@@ -45,6 +42,7 @@ const DefaultSimilarityMetric = EuclideanDistance
|
||||
// Supported similarity metrics for vector fields
|
||||
var SupportedSimilarityMetrics = map[string]struct{}{
|
||||
EuclideanDistance: {},
|
||||
InnerProduct: {},
|
||||
CosineSimilarity: {},
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -48,8 +48,11 @@ type VectorReader interface {
|
||||
}
|
||||
|
||||
type VectorIndexReader interface {
|
||||
VectorReader(ctx context.Context, vector []float32, field string, k int64, searchParams json.RawMessage) (
|
||||
VectorReader, error)
|
||||
VectorReader(ctx context.Context, vector []float32, field string, k int64,
|
||||
searchParams json.RawMessage) (VectorReader, error)
|
||||
|
||||
VectorReaderWithFilter(ctx context.Context, vector []float32, field string, k int64,
|
||||
searchParams json.RawMessage, filterIDs []IndexInternalID) (VectorReader, error)
|
||||
}
|
||||
|
||||
type VectorDoc struct {
|
||||
|
||||
Reference in New Issue
Block a user