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) EXPECT ¶
func (m *MockExecutor) EXPECT() *MockExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
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
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 ¶
func (m *MockSearcher) EXPECT() *MockSearcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
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 ¶
func (mr *MockSearcherMockRecorder) Err() *gomock.Call
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.