search

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIndexParamInvalid = errors.New("invalid index params")
)

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}
var GlobalService *Service

func Init

func Init() *Service

func NewService

func NewService(registered map[driver.Type]driver.SearchEngine) *Service

func (*Service) DeleteByID

func (s *Service) DeleteByID(ctx context.Context, request *pb.DeleteByIDRequest) (*pb.DeleteByIDResponse, error)

func (*Service) Index

func (s *Service) Index(ctx context.Context, in *pb.IndexObject) (*pb.IndexResponse, error)

func (*Service) Register

func (s *Service) Register(name driver.Type, implement driver.SearchEngine) *Service

func (*Service) Search

func (s *Service) Search(ctx context.Context, request *pb.SearchRequest) (*pb.SearchResponse, error)

func (*Service) Use

func (s *Service) Use(opt driver.SelectDriveOption) *Service

Use SelectDriveOption and set the option to this service.

func (Service) With

func (s Service) With(opt driver.SelectDriveOption) *Service

With SelectDriveOption create a copy from original service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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