From 25e444fbe299fae62e2e43107deb31ee9bdbd9f4 Mon Sep 17 00:00:00 2001 From: Kosuke Morimoto Date: Fri, 16 Aug 2024 22:22:37 +0900 Subject: [PATCH] fix Signed-off-by: Kosuke Morimoto --- internal/core/algorithm/ngt/ngt.go | 22 +++++++++++++++++----- pkg/gateway/lb/handler/grpc/handler.go | 4 +++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/internal/core/algorithm/ngt/ngt.go b/internal/core/algorithm/ngt/ngt.go index 4bf3b4b305..81bf667f22 100644 --- a/internal/core/algorithm/ngt/ngt.go +++ b/internal/core/algorithm/ngt/ngt.go @@ -251,7 +251,9 @@ const ( // HalfFloat is 16bit floating point number. HalfFloat // -------------------------------------------------------------. +) +const ( // ------------------------------------------------------------- // Distance Type Definition // ------------------------------------------------------------- @@ -283,28 +285,36 @@ const ( NormalizedCosine // InnerProduct is inner product distance. InnerProduct +) +const ( // ------------------------------------------------------------- // IndexType Definition // ------------------------------------------------------------- - IndexTypeNone = iota + IndexTypeNone indexType = iota GraphAndTree Graph +) +const ( // ------------------------------------------------------------- // DatabaseType Definition // ------------------------------------------------------------- - DatabaseTypeNone = iota + DatabaseTypeNone databaseType = iota Memory MemoryMappedFile +) +const ( // ------------------------------------------------------------- // ObjectAlignment Definition // ------------------------------------------------------------- - ObjectAlignmentNone = iota + ObjectAlignmentNone objectAlignment = iota ObjectAlignmentTrue ObjectAlignmentFalse +) +const ( // ------------------------------------------------------------- // SeedType Definition // ------------------------------------------------------------- @@ -314,7 +324,9 @@ const ( FixedNodes FirstNode AllLeafNodes +) +const ( // ------------------------------------------------------------- // GraphType Definition // ------------------------------------------------------------- @@ -327,9 +339,9 @@ const ( DNNG RANNG RIANNG +) - // -------------------------------------------------------------. - +const ( // ------------------------------------------------------------- // ErrorCode is false // -------------------------------------------------------------. diff --git a/pkg/gateway/lb/handler/grpc/handler.go b/pkg/gateway/lb/handler/grpc/handler.go index 6ae9a50173..205316e5c5 100644 --- a/pkg/gateway/lb/handler/grpc/handler.go +++ b/pkg/gateway/lb/handler/grpc/handler.go @@ -4129,7 +4129,9 @@ func (s *server) IndexProperty( } if prop != nil { mu.Lock() - detail.Details[target] = prop.Details[target] + for key, value := range prop.Details { + detail.Details[target+"-"+key] = value + } mu.Unlock() } return nil