search

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: Apache-2.0 Imports: 7 Imported by: 5 modules, 12 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package search is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	// Execute executes a query over the Executor's snapshot.
	Execute(q Query) (doc.Iterator, error)

	// Close closes the iterator.
	Close() error
}

Executor is responsible for executing queries over a snapshot.

type MockExecutor

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

MockExecutor is a mock of Executor interface

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance

func (*MockExecutor) Close

func (m *MockExecutor) Close() error

Close mocks base method

func (*MockExecutor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockExecutor) Execute

func (m *MockExecutor) Execute(q Query) (doc.Iterator, error)

Execute mocks base method

type MockExecutorMockRecorder

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

MockExecutorMockRecorder is the mock recorder for MockExecutor

func (*MockExecutorMockRecorder) Close

func (mr *MockExecutorMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockExecutorMockRecorder) Execute

func (mr *MockExecutorMockRecorder) Execute(q interface{}) *gomock.Call

Execute indicates an expected call of Execute

type MockQuery

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

MockQuery is a mock of Query interface

func NewMockQuery

func NewMockQuery(ctrl *gomock.Controller) *MockQuery

NewMockQuery creates a new mock instance

func (*MockQuery) EXPECT

func (m *MockQuery) EXPECT() *MockQueryMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockQuery) Equal

func (m *MockQuery) Equal(q Query) bool

Equal mocks base method

func (*MockQuery) Searcher

func (m *MockQuery) Searcher(rs index.Readers) (Searcher, error)

Searcher mocks base method

func (*MockQuery) String

func (m *MockQuery) String() string

String mocks base method

func (*MockQuery) ToProto

func (m *MockQuery) ToProto() *querypb.Query

ToProto mocks base method

type MockQueryMockRecorder

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

MockQueryMockRecorder is the mock recorder for MockQuery

func (*MockQueryMockRecorder) Equal

func (mr *MockQueryMockRecorder) Equal(q interface{}) *gomock.Call

Equal indicates an expected call of Equal

func (*MockQueryMockRecorder) Searcher

func (mr *MockQueryMockRecorder) Searcher(rs interface{}) *gomock.Call

Searcher indicates an expected call of Searcher

func (*MockQueryMockRecorder) String

func (mr *MockQueryMockRecorder) String() *gomock.Call

String indicates an expected call of String

func (*MockQueryMockRecorder) ToProto

func (mr *MockQueryMockRecorder) ToProto() *gomock.Call

ToProto indicates an expected call of ToProto

type MockSearcher

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

MockSearcher is a mock of Searcher interface

func NewMockSearcher

func NewMockSearcher(ctrl *gomock.Controller) *MockSearcher

NewMockSearcher creates a new mock instance

func (*MockSearcher) Current

func (m *MockSearcher) Current() postings.List

Current mocks base method

func (*MockSearcher) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockSearcher) Err

func (m *MockSearcher) Err() error

Err mocks base method

func (*MockSearcher) Next

func (m *MockSearcher) Next() bool

Next mocks base method

func (*MockSearcher) NumReaders

func (m *MockSearcher) NumReaders() int

NumReaders mocks base method

type MockSearcherMockRecorder

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

MockSearcherMockRecorder is the mock recorder for MockSearcher

func (*MockSearcherMockRecorder) Current

func (mr *MockSearcherMockRecorder) Current() *gomock.Call

Current indicates an expected call of Current

func (*MockSearcherMockRecorder) Err

Err indicates an expected call of Err

func (*MockSearcherMockRecorder) Next

func (mr *MockSearcherMockRecorder) Next() *gomock.Call

Next indicates an expected call of Next

func (*MockSearcherMockRecorder) NumReaders

func (mr *MockSearcherMockRecorder) NumReaders() *gomock.Call

NumReaders indicates an expected call of NumReaders

type Query

type Query interface {
	fmt.Stringer

	// Searcher returns a Searcher for executing the query over a set of Readers.
	Searcher(rs index.Readers) (Searcher, error)

	// Equal reports whether two queries are equivalent.
	Equal(q Query) bool

	// ToProto returns the Protobuf query struct corresponding to this query.
	ToProto() *querypb.Query
}

Query is a search query for documents.

type Searcher

type Searcher interface {
	// Next returns the whether the iterator has another postings list.
	Next() bool

	// Current returns the current postings list. It is only safe to call Current immediately
	// after a call to Next confirms there are more postings lists remaining.
	Current() postings.List

	// Err returns any errors encountered during iteration.
	Err() error

	// NumReaders returns the number of Readers that the Searcher is searching over.
	NumReaders() int
}

Searcher executes a query against a collection of Readers. It is an iterator which returns the postings lists of the documents it matches for each segment. A Searcher will execute queries over segments in parallel since the segments are independent. A Searcher is not safe for concurrent access.

type Searchers

type Searchers []Searcher

Searchers is a slice of Searcher.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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