Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexerClient ¶
type IndexerClient struct {
// contains filtered or unexported fields
}
IndexerClient provides an API compatible with the index.Indexer interface for accessing a text indexer instances exposed by a remote gRPC server.
func NewIndexerClient ¶
func NewIndexerClient(ctx context.Context, rpcClient proto.IndexerClient) *IndexerClient
NewIndexerClient returns a new client instance that implements a subset of the index.Indexer interface by delegating methods to an indexer instance exposed by a remote gRPC sever.
func (*IndexerClient) UpdateScore ¶
func (c *IndexerClient) UpdateScore(linkID uuid.UUID, score float64) error
type IndexerServer ¶
type IndexerServer struct { proto.UnimplementedIndexerServer // contains filtered or unexported fields }
IndexerServer provides a gRPC layer for indexing and querying documents.
func NewIndexerServer ¶
func NewIndexerServer(i indexer.Indexer) *IndexerServer
NewIndexerServer creates a new server instance that uses the provided indexer as its backing store.
func (*IndexerServer) Index ¶
Index inserts a new document to the index or updates the index entry for and existing document.
func (*IndexerServer) Search ¶
func (s *IndexerServer) Search(req *proto.Query, w proto.Indexer_SearchServer) error
Search the index for a particular query and stream the results back to the client. The first response will include the total result count while all subsequent responses will include documents from the resultset.
func (*IndexerServer) UpdateScore ¶
func (s *IndexerServer) UpdateScore(_ context.Context, req *proto.UpdateScoreRequest) (*empty.Empty, error)