Documentation ¶
Overview ¶
Package index is a generated GoMock package.
Index ¶
- type AtPositionDocIDSetIterator
- type DocIDPositionIterator
- type DocIDSet
- type DocIDSetBuilder
- type DocIDSetIterator
- type DocIDSetIteratorFn
- type EmptyDocIDSetIterator
- type ExcludeDocIDSetIterator
- type FullDocIDSetIterator
- type InAllDocIDSetIterator
- type InAnyDocIDSetIterator
- type MockDocIDPositionIterator
- func (m *MockDocIDPositionIterator) Close()
- func (m *MockDocIDPositionIterator) DocID() int32
- func (m *MockDocIDPositionIterator) EXPECT() *MockDocIDPositionIteratorMockRecorder
- func (m *MockDocIDPositionIterator) Err() error
- func (m *MockDocIDPositionIterator) MaskingPosition() int
- func (m *MockDocIDPositionIterator) Next() bool
- func (m *MockDocIDPositionIterator) Position() int
- type MockDocIDPositionIteratorMockRecorder
- func (mr *MockDocIDPositionIteratorMockRecorder) Close() *gomock.Call
- func (mr *MockDocIDPositionIteratorMockRecorder) DocID() *gomock.Call
- func (mr *MockDocIDPositionIteratorMockRecorder) Err() *gomock.Call
- func (mr *MockDocIDPositionIteratorMockRecorder) MaskingPosition() *gomock.Call
- func (mr *MockDocIDPositionIteratorMockRecorder) Next() *gomock.Call
- func (mr *MockDocIDPositionIteratorMockRecorder) Position() *gomock.Call
- type MockDocIDSet
- type MockDocIDSetIterator
- type MockDocIDSetIteratorMockRecorder
- type MockDocIDSetMockRecorder
- type MockSeekableDocIDSetIterator
- func (m *MockSeekableDocIDSetIterator) Close()
- func (m *MockSeekableDocIDSetIterator) DocID() int32
- func (m *MockSeekableDocIDSetIterator) EXPECT() *MockSeekableDocIDSetIteratorMockRecorder
- func (m *MockSeekableDocIDSetIterator) Err() error
- func (m *MockSeekableDocIDSetIterator) Next() bool
- func (m *MockSeekableDocIDSetIterator) SeekForward(arg0 int) error
- type MockSeekableDocIDSetIteratorMockRecorder
- func (mr *MockSeekableDocIDSetIteratorMockRecorder) Close() *gomock.Call
- func (mr *MockSeekableDocIDSetIteratorMockRecorder) DocID() *gomock.Call
- func (mr *MockSeekableDocIDSetIteratorMockRecorder) Err() *gomock.Call
- func (mr *MockSeekableDocIDSetIteratorMockRecorder) Next() *gomock.Call
- func (mr *MockSeekableDocIDSetIteratorMockRecorder) SeekForward(arg0 interface{}) *gomock.Call
- type SeekableDocIDSetIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtPositionDocIDSetIterator ¶
type AtPositionDocIDSetIterator struct {
// contains filtered or unexported fields
}
AtPositionDocIDSetIterator outputs the doc IDs from the doc ID set iterator at the given positions from the position iterator.
func NewAtPositionDocIDSetIterator ¶
func NewAtPositionDocIDSetIterator( docIt DocIDSetIterator, positionIt iterator.PositionIterator, ) *AtPositionDocIDSetIterator
NewAtPositionDocIDSetIterator creates a new at position iterator.
func (*AtPositionDocIDSetIterator) Close ¶
func (it *AtPositionDocIDSetIterator) Close()
Close closes the iterator.
func (*AtPositionDocIDSetIterator) DocID ¶
func (it *AtPositionDocIDSetIterator) DocID() int32
DocID returns the current doc ID.
func (*AtPositionDocIDSetIterator) Err ¶
func (it *AtPositionDocIDSetIterator) Err() error
Err returns any error encountered.
func (*AtPositionDocIDSetIterator) Next ¶
func (it *AtPositionDocIDSetIterator) Next() bool
Next returns true if there are more doc IDs to be iterated over.
type DocIDPositionIterator ¶
type DocIDPositionIterator interface { DocIDSetIterator // Position is the position in the backing doc ID set. Position() int // MaskingPosition is the position in the masking doc ID set. MaskingPosition() int }
DocIDPositionIterator is an iterator that contains a backing doc ID set iterator and a "masking" doc ID set iterator. The iterator outputs the position of doc IDs in the backing doc ID set iterator, as well as the doc IDs at the corresponding positions. It implements both `DocIDSetIterator` and `PositionIterator` interface.
func NewDocIDPositionIterator ¶
func NewDocIDPositionIterator( backingIt DocIDSetIterator, maskingIt DocIDSetIterator, ) DocIDPositionIterator
NewDocIDPositionIterator creates a new doc ID position iterator.
type DocIDSet ¶
type DocIDSet interface { // Iter returns the document ID set iterator. Iter() DocIDSetIterator // Intersect returns the set of positions in the current doc ID set that // are also in the doc ID set given by the iterator passed in. Intersect(it DocIDSetIterator) DocIDPositionIterator // WriteTo writes the document ID set to an io.Writer. // NB: extBuf is an external buffer for reuse. WriteTo(writer io.Writer, extBuf *bytes.Buffer) error }
DocIDSet is a document ID set.
type DocIDSetBuilder ¶
type DocIDSetBuilder interface { // Add adds a single document ID. Add(docID int32) // Snapshot returns an immutable snapshot of the builder state. // Snapshot can be processed independently of operations performed against the builder. Snapshot() DocIDSet // Seal seals a doc ID set effectively making it immutable. Seal(numTotalDocs int32) DocIDSet }
DocIDSetBuilder builds a document ID set.
func NewBitmapBasedDocIDSetBuilder ¶
func NewBitmapBasedDocIDSetBuilder(bm *roaring.Bitmap) DocIDSetBuilder
NewBitmapBasedDocIDSetBuilder creates a new bitmap based doc ID set builder.
type DocIDSetIterator ¶
type DocIDSetIterator interface { // Next returns true if there are more document IDs to be iterated over. Next() bool // DocID returns the current document ID. // NB: This is not called `Current` because it needs to // be embedded with other iterators so the method name is // more specific w.r.t. what value this is referring to. DocID() int32 // Err returns any error encountered during iteration. Err() error // Close closes the iterator. Close() }
DocIDSetIterator is the document ID set iterator.
func NoOpDocIDSetIteratorFn ¶
func NoOpDocIDSetIteratorFn(it DocIDSetIterator) DocIDSetIterator
NoOpDocIDSetIteratorFn is a no op transformation function that returns the input iterator as is.
type DocIDSetIteratorFn ¶
type DocIDSetIteratorFn func(it DocIDSetIterator) DocIDSetIterator
DocIDSetIteratorFn transforms an input doc ID set iterator into a new doc ID set iterator.
func ExcludeDocIDSetIteratorFn ¶
func ExcludeDocIDSetIteratorFn(numTotalDocs int32) DocIDSetIteratorFn
ExcludeDocIDSetIteratorFn returns a transformation function that excludes the doc ID set associated with the input iterator from the full doc ID set.
type EmptyDocIDSetIterator ¶
type EmptyDocIDSetIterator struct{}
EmptyDocIDSetIterator is an empty doc ID set iterator.
func NewEmptyDocIDSetIterator ¶
func NewEmptyDocIDSetIterator() EmptyDocIDSetIterator
NewEmptyDocIDSetIterator creates a new empty doc ID set iterator.
func (EmptyDocIDSetIterator) Close ¶
func (it EmptyDocIDSetIterator) Close()
Close closes the iterator.
func (EmptyDocIDSetIterator) DocID ¶
func (it EmptyDocIDSetIterator) DocID() int32
DocID returns the current doc ID.
func (EmptyDocIDSetIterator) Err ¶
func (it EmptyDocIDSetIterator) Err() error
Err returns any error encountered during iteration.
func (EmptyDocIDSetIterator) Next ¶
func (it EmptyDocIDSetIterator) Next() bool
Next returns true if there are more doc IDs to be iterated over.
type ExcludeDocIDSetIterator ¶
type ExcludeDocIDSetIterator struct {
// contains filtered or unexported fields
}
ExcludeDocIDSetIterator is an iterator that excludes a given doc ID set from the full doc ID set defined as [0, numTotalDocs).
func NewExcludeDocIDSetIterator ¶
func NewExcludeDocIDSetIterator( numTotalDocs int32, toExcludeIt DocIDSetIterator, ) *ExcludeDocIDSetIterator
NewExcludeDocIDSetIterator creates a new iterator.
func (*ExcludeDocIDSetIterator) Close ¶
func (it *ExcludeDocIDSetIterator) Close()
Close closes the iterator.
func (*ExcludeDocIDSetIterator) DocID ¶
func (it *ExcludeDocIDSetIterator) DocID() int32
DocID returns the current doc ID.
func (*ExcludeDocIDSetIterator) Err ¶
func (it *ExcludeDocIDSetIterator) Err() error
Err returns any error encountered during iteration.
func (*ExcludeDocIDSetIterator) Next ¶
func (it *ExcludeDocIDSetIterator) Next() bool
Next returns true if there are more doc IDs to be iterated over.
type FullDocIDSetIterator ¶
type FullDocIDSetIterator struct {
// contains filtered or unexported fields
}
FullDocIDSetIterator is an iterator for a full doc ID set containing document IDs ranging from 0 (inclusive) to `numTotalDocs` (exclusive).
func NewFullDocIDSetIterator ¶
func NewFullDocIDSetIterator(numTotalDocs int32) *FullDocIDSetIterator
NewFullDocIDSetIterator creates a new full doc ID set iterator.
func (*FullDocIDSetIterator) Close ¶
func (it *FullDocIDSetIterator) Close()
Close closes the iterator.
func (*FullDocIDSetIterator) DocID ¶
func (it *FullDocIDSetIterator) DocID() int32
DocID returns the current doc ID.
func (*FullDocIDSetIterator) Err ¶
func (it *FullDocIDSetIterator) Err() error
Err returns any error encountered during iteration.
func (*FullDocIDSetIterator) Next ¶
func (it *FullDocIDSetIterator) Next() bool
Next returns true if there are more doc IDs to be iterated over.
type InAllDocIDSetIterator ¶
type InAllDocIDSetIterator struct {
// contains filtered or unexported fields
}
InAllDocIDSetIterator iterates over an array of doc ID set iterators. Each inner iterator outputs doc IDs in increasing order, and the outer iterator only outputs a doc ID if it exists in the output of all inner iterators. TODO(xichen): Look into using bitset to make this faster based on benchmark results.
func NewInAllDocIDSetIterator ¶
func NewInAllDocIDSetIterator(iters ...DocIDSetIterator) *InAllDocIDSetIterator
NewInAllDocIDSetIterator creates a new iterator.
func (*InAllDocIDSetIterator) Close ¶
func (it *InAllDocIDSetIterator) Close()
Close closes the iterator.
func (*InAllDocIDSetIterator) DocID ¶
func (it *InAllDocIDSetIterator) DocID() int32
DocID returns the current doc ID.
func (*InAllDocIDSetIterator) Err ¶
func (it *InAllDocIDSetIterator) Err() error
Err returns any errors encountered.
func (*InAllDocIDSetIterator) Next ¶
func (it *InAllDocIDSetIterator) Next() bool
Next returns true if there are more doc IDs to be iterated over. NB(xichen): This has a complexity of O(MN) where M is the number of inner iterators and N is the total number of document IDs across all iterators. However in practice, M is likely to be small so this may end up being as fast as or faster than a min heap based solution.
type InAnyDocIDSetIterator ¶
type InAnyDocIDSetIterator struct {
// contains filtered or unexported fields
}
InAnyDocIDSetIterator iterates over an array of doc ID set iterators. Each inner iterator outputs doc IDs in increasing order, and the outer iterator outputs a doc ID if it exists in the output of any inner iterators. TODO(xichen): Look into using bitset to make this faster based on benchmark results.
func NewInAnyDocIDSetIterator ¶
func NewInAnyDocIDSetIterator(iters ...DocIDSetIterator) *InAnyDocIDSetIterator
NewInAnyDocIDSetIterator creates a new iterator.
func (*InAnyDocIDSetIterator) Close ¶
func (it *InAnyDocIDSetIterator) Close()
Close closes the iterator.
func (*InAnyDocIDSetIterator) DocID ¶
func (it *InAnyDocIDSetIterator) DocID() int32
DocID returns the current doc ID.
func (*InAnyDocIDSetIterator) Err ¶
func (it *InAnyDocIDSetIterator) Err() error
Err returns any errors encountered.
func (*InAnyDocIDSetIterator) IsValidAt ¶
func (it *InAnyDocIDSetIterator) IsValidAt(idx int) bool
IsValidAt returns true if the base iterator at a given index has the same doc ID as the current doc ID of the `InAnyDocIDSetIterator`.
func (*InAnyDocIDSetIterator) Next ¶
func (it *InAnyDocIDSetIterator) Next() bool
Next returns true if there are more doc IDs to be iterated over. NB(xichen): This has a complexity of O(MN) where M is the number of inner iterators and N is the total number of document IDs across all iterators. However in practice, M is likely to be small so this may end up being as fast as or faster than a min heap based solution.
type MockDocIDPositionIterator ¶
type MockDocIDPositionIterator struct {
// contains filtered or unexported fields
}
MockDocIDPositionIterator is a mock of DocIDPositionIterator interface
func NewMockDocIDPositionIterator ¶
func NewMockDocIDPositionIterator(ctrl *gomock.Controller) *MockDocIDPositionIterator
NewMockDocIDPositionIterator creates a new mock instance
func (*MockDocIDPositionIterator) Close ¶
func (m *MockDocIDPositionIterator) Close()
Close mocks base method
func (*MockDocIDPositionIterator) DocID ¶
func (m *MockDocIDPositionIterator) DocID() int32
DocID mocks base method
func (*MockDocIDPositionIterator) EXPECT ¶
func (m *MockDocIDPositionIterator) EXPECT() *MockDocIDPositionIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDocIDPositionIterator) Err ¶
func (m *MockDocIDPositionIterator) Err() error
Err mocks base method
func (*MockDocIDPositionIterator) MaskingPosition ¶
func (m *MockDocIDPositionIterator) MaskingPosition() int
MaskingPosition mocks base method
func (*MockDocIDPositionIterator) Next ¶
func (m *MockDocIDPositionIterator) Next() bool
Next mocks base method
func (*MockDocIDPositionIterator) Position ¶
func (m *MockDocIDPositionIterator) Position() int
Position mocks base method
type MockDocIDPositionIteratorMockRecorder ¶
type MockDocIDPositionIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockDocIDPositionIteratorMockRecorder is the mock recorder for MockDocIDPositionIterator
func (*MockDocIDPositionIteratorMockRecorder) Close ¶
func (mr *MockDocIDPositionIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockDocIDPositionIteratorMockRecorder) DocID ¶
func (mr *MockDocIDPositionIteratorMockRecorder) DocID() *gomock.Call
DocID indicates an expected call of DocID
func (*MockDocIDPositionIteratorMockRecorder) Err ¶
func (mr *MockDocIDPositionIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockDocIDPositionIteratorMockRecorder) MaskingPosition ¶
func (mr *MockDocIDPositionIteratorMockRecorder) MaskingPosition() *gomock.Call
MaskingPosition indicates an expected call of MaskingPosition
func (*MockDocIDPositionIteratorMockRecorder) Next ¶
func (mr *MockDocIDPositionIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
func (*MockDocIDPositionIteratorMockRecorder) Position ¶
func (mr *MockDocIDPositionIteratorMockRecorder) Position() *gomock.Call
Position indicates an expected call of Position
type MockDocIDSet ¶
type MockDocIDSet struct {
// contains filtered or unexported fields
}
MockDocIDSet is a mock of DocIDSet interface
func NewMockDocIDSet ¶
func NewMockDocIDSet(ctrl *gomock.Controller) *MockDocIDSet
NewMockDocIDSet creates a new mock instance
func (*MockDocIDSet) EXPECT ¶
func (m *MockDocIDSet) EXPECT() *MockDocIDSetMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDocIDSet) Intersect ¶
func (m *MockDocIDSet) Intersect(arg0 DocIDSetIterator) DocIDPositionIterator
Intersect mocks base method
type MockDocIDSetIterator ¶
type MockDocIDSetIterator struct {
// contains filtered or unexported fields
}
MockDocIDSetIterator is a mock of DocIDSetIterator interface
func NewMockDocIDSetIterator ¶
func NewMockDocIDSetIterator(ctrl *gomock.Controller) *MockDocIDSetIterator
NewMockDocIDSetIterator creates a new mock instance
func (*MockDocIDSetIterator) DocID ¶
func (m *MockDocIDSetIterator) DocID() int32
DocID mocks base method
func (*MockDocIDSetIterator) EXPECT ¶
func (m *MockDocIDSetIterator) EXPECT() *MockDocIDSetIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDocIDSetIterator) Next ¶
func (m *MockDocIDSetIterator) Next() bool
Next mocks base method
type MockDocIDSetIteratorMockRecorder ¶
type MockDocIDSetIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockDocIDSetIteratorMockRecorder is the mock recorder for MockDocIDSetIterator
func (*MockDocIDSetIteratorMockRecorder) Close ¶
func (mr *MockDocIDSetIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockDocIDSetIteratorMockRecorder) DocID ¶
func (mr *MockDocIDSetIteratorMockRecorder) DocID() *gomock.Call
DocID indicates an expected call of DocID
func (*MockDocIDSetIteratorMockRecorder) Err ¶
func (mr *MockDocIDSetIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockDocIDSetIteratorMockRecorder) Next ¶
func (mr *MockDocIDSetIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
type MockDocIDSetMockRecorder ¶
type MockDocIDSetMockRecorder struct {
// contains filtered or unexported fields
}
MockDocIDSetMockRecorder is the mock recorder for MockDocIDSet
func (*MockDocIDSetMockRecorder) Intersect ¶
func (mr *MockDocIDSetMockRecorder) Intersect(arg0 interface{}) *gomock.Call
Intersect indicates an expected call of Intersect
func (*MockDocIDSetMockRecorder) Iter ¶
func (mr *MockDocIDSetMockRecorder) Iter() *gomock.Call
Iter indicates an expected call of Iter
func (*MockDocIDSetMockRecorder) WriteTo ¶
func (mr *MockDocIDSetMockRecorder) WriteTo(arg0, arg1 interface{}) *gomock.Call
WriteTo indicates an expected call of WriteTo
type MockSeekableDocIDSetIterator ¶
type MockSeekableDocIDSetIterator struct {
// contains filtered or unexported fields
}
MockSeekableDocIDSetIterator is a mock of SeekableDocIDSetIterator interface
func NewMockSeekableDocIDSetIterator ¶
func NewMockSeekableDocIDSetIterator(ctrl *gomock.Controller) *MockSeekableDocIDSetIterator
NewMockSeekableDocIDSetIterator creates a new mock instance
func (*MockSeekableDocIDSetIterator) Close ¶
func (m *MockSeekableDocIDSetIterator) Close()
Close mocks base method
func (*MockSeekableDocIDSetIterator) DocID ¶
func (m *MockSeekableDocIDSetIterator) DocID() int32
DocID mocks base method
func (*MockSeekableDocIDSetIterator) EXPECT ¶
func (m *MockSeekableDocIDSetIterator) EXPECT() *MockSeekableDocIDSetIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSeekableDocIDSetIterator) Err ¶
func (m *MockSeekableDocIDSetIterator) Err() error
Err mocks base method
func (*MockSeekableDocIDSetIterator) Next ¶
func (m *MockSeekableDocIDSetIterator) Next() bool
Next mocks base method
func (*MockSeekableDocIDSetIterator) SeekForward ¶
func (m *MockSeekableDocIDSetIterator) SeekForward(arg0 int) error
SeekForward mocks base method
type MockSeekableDocIDSetIteratorMockRecorder ¶
type MockSeekableDocIDSetIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockSeekableDocIDSetIteratorMockRecorder is the mock recorder for MockSeekableDocIDSetIterator
func (*MockSeekableDocIDSetIteratorMockRecorder) Close ¶
func (mr *MockSeekableDocIDSetIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockSeekableDocIDSetIteratorMockRecorder) DocID ¶
func (mr *MockSeekableDocIDSetIteratorMockRecorder) DocID() *gomock.Call
DocID indicates an expected call of DocID
func (*MockSeekableDocIDSetIteratorMockRecorder) Err ¶
func (mr *MockSeekableDocIDSetIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockSeekableDocIDSetIteratorMockRecorder) Next ¶
func (mr *MockSeekableDocIDSetIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
func (*MockSeekableDocIDSetIteratorMockRecorder) SeekForward ¶
func (mr *MockSeekableDocIDSetIteratorMockRecorder) SeekForward(arg0 interface{}) *gomock.Call
SeekForward indicates an expected call of SeekForward
type SeekableDocIDSetIterator ¶
type SeekableDocIDSetIterator interface { DocIDSetIterator // SeekForward moves the iterator forward n positions. SeekForward(n int) error }
SeekableDocIDSetIterator is a doc ID set iterator that can seek to positions. TODO(xichen): DocIDSetIterator implementations should implement this interface where possible to speed things up.
Source Files ¶
- at_position_doc_id_set_iterator.go
- bitmap_based_doc_id_position_iterator.go
- bitmap_based_doc_id_set_iterator.go
- doc_id_position_iterator.go
- doc_id_set.go
- doc_id_set_iterator.go
- empty_doc_id_set_iterator.go
- exclude_doc_id_set_iterator.go
- full_doc_id_position_iterator.go
- full_doc_id_set_iterator.go
- in_all_doc_id_set_iterator.go
- in_any_doc_id_set_iterator.go
- index_mock.go