Documentation ¶
Index ¶
- type Config
- type Server
- func (s *Server) CreateIndex(_ context.Context, req *grpcapi.CreateIndexRequest) (*emptypb.Empty, error)
- func (s *Server) DeleteIndex(_ context.Context, req *grpcapi.DeleteIndexRequest) (*emptypb.Empty, error)
- func (s *Server) FlushIndex(_ context.Context, req *grpcapi.FlushRequest) (*emptypb.Empty, error)
- func (s *Server) Indices(context.Context, *emptypb.Empty) (*grpcapi.IndicesReply, error)
- func (s *Server) InsertVector(_ context.Context, req *grpcapi.InsertVectorRequest) (*grpcapi.InsertVectorReply, error)
- func (s *Server) InsertVectorWithId(_ context.Context, req *grpcapi.InsertVectorWithIdRequest) (*grpcapi.InsertVectorWithIdReply, error)
- func (s *Server) InsertVectors(stream grpcapi.Server_InsertVectorsServer) error
- func (s *Server) InsertVectorsWithIds(stream grpcapi.Server_InsertVectorsWithIdsServer) error
- func (s *Server) Run() error
- func (s *Server) SearchKNN(_ context.Context, req *grpcapi.SearchRequest) (*grpcapi.SearchKNNReply, error)
- func (s *Server) SetEf(_ context.Context, req *grpcapi.SetEfRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { grpcapi.UnimplementedServerServer // contains filtered or unexported fields }
Server is the main implementation of HNSW gRPC server.
func New ¶
func New(config Config, indexManager *indexmanager.IndexManager, logger zerolog.Logger) *Server
New creates a new Server.
func (*Server) CreateIndex ¶
func (s *Server) CreateIndex(_ context.Context, req *grpcapi.CreateIndexRequest) (*emptypb.Empty, error)
CreateIndex makes a new index.
func (*Server) DeleteIndex ¶
func (s *Server) DeleteIndex(_ context.Context, req *grpcapi.DeleteIndexRequest) (*emptypb.Empty, error)
DeleteIndex removes an index.
func (*Server) FlushIndex ¶
FlushIndex flushes the index to file.
func (*Server) InsertVector ¶
func (s *Server) InsertVector(_ context.Context, req *grpcapi.InsertVectorRequest) (*grpcapi.InsertVectorReply, error)
InsertVector inserts a new vector in the given index.
func (*Server) InsertVectorWithId ¶
func (s *Server) InsertVectorWithId(_ context.Context, req *grpcapi.InsertVectorWithIdRequest) (*grpcapi.InsertVectorWithIdReply, error)
InsertVectorWithId inserts a new vector in the given index.
func (*Server) InsertVectors ¶
func (s *Server) InsertVectors(stream grpcapi.Server_InsertVectorsServer) error
InsertVectors inserts the new vectors in the given index. It flushes the index at each batch.
func (*Server) InsertVectorsWithIds ¶
func (s *Server) InsertVectorsWithIds(stream grpcapi.Server_InsertVectorsWithIdsServer) error
InsertVectorsWithIds inserts the new vectors in the given index. It flushes the index at each batch.
func (*Server) SearchKNN ¶
func (s *Server) SearchKNN(_ context.Context, req *grpcapi.SearchRequest) (*grpcapi.SearchKNNReply, error)
SearchKNN returns the top k nearest neighbors to the query, searching on the given index.
Click to show internal directories.
Click to hide internal directories.