textindexerapi

package
v0.0.0-...-8b501b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TextIndexerClient

type TextIndexerClient struct {
	// contains filtered or unexported fields
}

TextIndexerClient provides an API compatible with the index.Indexer interface for accessing a text indexer instances exposed by a remote gRPC server.

func NewTextIndexerClient

func NewTextIndexerClient(ctx context.Context, rpcClient proto.TextIndexerClient) *TextIndexerClient

NewTextIndexerClient 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 (*TextIndexerClient) Index

func (c *TextIndexerClient) Index(doc *index.Document) error

Index inserts a new document to the index or updates the index entry for and existing document.

func (*TextIndexerClient) Search

func (c *TextIndexerClient) Search(query index.Query) (index.Iterator, error)

Search the index for a particular query and return back a result iterator.

func (*TextIndexerClient) UpdateScore

func (c *TextIndexerClient) UpdateScore(linkID uuid.UUID, score float64) error

UpdateScore updates the PageRank score for a document with the specified link ID.

type TextIndexerServer

type TextIndexerServer struct {
	// contains filtered or unexported fields
}

TextIndexerServer provides a gRPC layer for indexing and querying documents.

func NewTextIndexerServer

func NewTextIndexerServer(i index.Indexer) *TextIndexerServer

NewTextIndexerServer creates a new server instance that uses the provided indexer as its backing store.

func (*TextIndexerServer) Index

Index inserts a new document to the index or updates the index entry for and existing document.

func (*TextIndexerServer) Search

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 (*TextIndexerServer) UpdateScore

UpdateScore updates the PageRank score for a document with the specified link ID.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL