segment

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: Apache-2.0 Imports: 6 Imported by: 24

Documentation

Overview

Package segment is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClosed is the error returned when attempting to perform operations on a
	// segment that has already been closed.
	ErrClosed = errors.New("segment has been closed")
)

Functions

This section is empty.

Types

type Builder added in v0.5.0

type Builder interface {
	FieldsIterable
	TermsIterable

	// Reset resets the builder for reuse.
	Reset(offset postings.ID)

	// Docs returns the current docs slice, this is not safe to modify
	// and is invalidated on a call to reset.
	Docs() []doc.Document

	// AllDocs returns an iterator over the documents known to the Reader.
	AllDocs() (index.IDDocIterator, error)
}

Builder is a builder that can be used to construct segments.

type DocumentsBuilder added in v0.5.0

type DocumentsBuilder interface {
	Builder
	index.Writer
}

DocumentsBuilder is a builder is written documents to.

type FieldsIterable added in v0.5.0

type FieldsIterable interface {
	// Fields returns an iterator over the list of known fields, in order
	// by name, it is not valid for reading after mutating the
	// builder by inserting more documents.
	Fields() (FieldsIterator, error)
}

FieldsIterable can iterate over segment fields, it is not by default concurrency safe.

type FieldsIterator added in v0.4.1

type FieldsIterator interface {
	// Next returns a bool indicating if there are any more elements.
	Next() bool

	// Current returns the current element.
	// NB: the element returned is only valid until the subsequent call to Next().
	Current() []byte

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

	// Close releases any resources held by the iterator.
	Close() error
}

FieldsIterator iterates over all known fields.

type MockBuilder added in v0.5.0

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

MockBuilder is a mock of Builder interface

func NewMockBuilder added in v0.5.0

func NewMockBuilder(ctrl *gomock.Controller) *MockBuilder

NewMockBuilder creates a new mock instance

func (*MockBuilder) AllDocs added in v0.5.0

func (m *MockBuilder) AllDocs() (index.IDDocIterator, error)

AllDocs mocks base method

func (*MockBuilder) Docs added in v0.5.0

func (m *MockBuilder) Docs() []doc.Document

Docs mocks base method

func (*MockBuilder) EXPECT added in v0.5.0

func (m *MockBuilder) EXPECT() *MockBuilderMockRecorder

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

func (*MockBuilder) Fields added in v0.5.0

func (m *MockBuilder) Fields() (FieldsIterator, error)

Fields mocks base method

func (*MockBuilder) Reset added in v0.5.0

func (m *MockBuilder) Reset(offset postings.ID)

Reset mocks base method

func (*MockBuilder) Terms added in v0.5.0

func (m *MockBuilder) Terms(field []byte) (TermsIterator, error)

Terms mocks base method

type MockBuilderMockRecorder added in v0.5.0

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

MockBuilderMockRecorder is the mock recorder for MockBuilder

func (*MockBuilderMockRecorder) AllDocs added in v0.5.0

func (mr *MockBuilderMockRecorder) AllDocs() *gomock.Call

AllDocs indicates an expected call of AllDocs

func (*MockBuilderMockRecorder) Docs added in v0.5.0

func (mr *MockBuilderMockRecorder) Docs() *gomock.Call

Docs indicates an expected call of Docs

func (*MockBuilderMockRecorder) Fields added in v0.5.0

func (mr *MockBuilderMockRecorder) Fields() *gomock.Call

Fields indicates an expected call of Fields

func (*MockBuilderMockRecorder) Reset added in v0.5.0

func (mr *MockBuilderMockRecorder) Reset(offset interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockBuilderMockRecorder) Terms added in v0.5.0

func (mr *MockBuilderMockRecorder) Terms(field interface{}) *gomock.Call

Terms indicates an expected call of Terms

type MockDocumentsBuilder added in v0.9.0

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

MockDocumentsBuilder is a mock of DocumentsBuilder interface

func NewMockDocumentsBuilder added in v0.9.0

func NewMockDocumentsBuilder(ctrl *gomock.Controller) *MockDocumentsBuilder

NewMockDocumentsBuilder creates a new mock instance

func (*MockDocumentsBuilder) AllDocs added in v0.9.0

AllDocs mocks base method

func (*MockDocumentsBuilder) Docs added in v0.9.0

func (m *MockDocumentsBuilder) Docs() []doc.Document

Docs mocks base method

func (*MockDocumentsBuilder) EXPECT added in v0.9.0

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

func (*MockDocumentsBuilder) Fields added in v0.9.0

func (m *MockDocumentsBuilder) Fields() (FieldsIterator, error)

Fields mocks base method

func (*MockDocumentsBuilder) Insert added in v0.9.0

func (m *MockDocumentsBuilder) Insert(d doc.Document) ([]byte, error)

Insert mocks base method

func (*MockDocumentsBuilder) InsertBatch added in v0.9.0

func (m *MockDocumentsBuilder) InsertBatch(b index.Batch) error

InsertBatch mocks base method

func (*MockDocumentsBuilder) Reset added in v0.9.0

func (m *MockDocumentsBuilder) Reset(offset postings.ID)

Reset mocks base method

func (*MockDocumentsBuilder) Terms added in v0.9.0

func (m *MockDocumentsBuilder) Terms(field []byte) (TermsIterator, error)

Terms mocks base method

type MockDocumentsBuilderMockRecorder added in v0.9.0

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

MockDocumentsBuilderMockRecorder is the mock recorder for MockDocumentsBuilder

func (*MockDocumentsBuilderMockRecorder) AllDocs added in v0.9.0

AllDocs indicates an expected call of AllDocs

func (*MockDocumentsBuilderMockRecorder) Docs added in v0.9.0

Docs indicates an expected call of Docs

func (*MockDocumentsBuilderMockRecorder) Fields added in v0.9.0

Fields indicates an expected call of Fields

func (*MockDocumentsBuilderMockRecorder) Insert added in v0.9.0

func (mr *MockDocumentsBuilderMockRecorder) Insert(d interface{}) *gomock.Call

Insert indicates an expected call of Insert

func (*MockDocumentsBuilderMockRecorder) InsertBatch added in v0.9.0

func (mr *MockDocumentsBuilderMockRecorder) InsertBatch(b interface{}) *gomock.Call

InsertBatch indicates an expected call of InsertBatch

func (*MockDocumentsBuilderMockRecorder) Reset added in v0.9.0

func (mr *MockDocumentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockDocumentsBuilderMockRecorder) Terms added in v0.9.0

func (mr *MockDocumentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call

Terms indicates an expected call of Terms

type MockFieldsIterable added in v0.9.0

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

MockFieldsIterable is a mock of FieldsIterable interface

func NewMockFieldsIterable added in v0.9.0

func NewMockFieldsIterable(ctrl *gomock.Controller) *MockFieldsIterable

NewMockFieldsIterable creates a new mock instance

func (*MockFieldsIterable) EXPECT added in v0.9.0

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

func (*MockFieldsIterable) Fields added in v0.9.0

func (m *MockFieldsIterable) Fields() (FieldsIterator, error)

Fields mocks base method

type MockFieldsIterableMockRecorder added in v0.9.0

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

MockFieldsIterableMockRecorder is the mock recorder for MockFieldsIterable

func (*MockFieldsIterableMockRecorder) Fields added in v0.9.0

Fields indicates an expected call of Fields

type MockFieldsIterator added in v0.9.0

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

MockFieldsIterator is a mock of FieldsIterator interface

func NewMockFieldsIterator added in v0.9.0

func NewMockFieldsIterator(ctrl *gomock.Controller) *MockFieldsIterator

NewMockFieldsIterator creates a new mock instance

func (*MockFieldsIterator) Close added in v0.9.0

func (m *MockFieldsIterator) Close() error

Close mocks base method

func (*MockFieldsIterator) Current added in v0.9.0

func (m *MockFieldsIterator) Current() []byte

Current mocks base method

func (*MockFieldsIterator) EXPECT added in v0.9.0

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

func (*MockFieldsIterator) Err added in v0.9.0

func (m *MockFieldsIterator) Err() error

Err mocks base method

func (*MockFieldsIterator) Next added in v0.9.0

func (m *MockFieldsIterator) Next() bool

Next mocks base method

type MockFieldsIteratorMockRecorder added in v0.9.0

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

MockFieldsIteratorMockRecorder is the mock recorder for MockFieldsIterator

func (*MockFieldsIteratorMockRecorder) Close added in v0.9.0

Close indicates an expected call of Close

func (*MockFieldsIteratorMockRecorder) Current added in v0.9.0

Current indicates an expected call of Current

func (*MockFieldsIteratorMockRecorder) Err added in v0.9.0

Err indicates an expected call of Err

func (*MockFieldsIteratorMockRecorder) Next added in v0.9.0

Next indicates an expected call of Next

type MockMutableSegment

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

MockMutableSegment is a mock of MutableSegment interface

func NewMockMutableSegment

func NewMockMutableSegment(ctrl *gomock.Controller) *MockMutableSegment

NewMockMutableSegment creates a new mock instance

func (*MockMutableSegment) AllDocs added in v0.5.0

func (m *MockMutableSegment) AllDocs() (index.IDDocIterator, error)

AllDocs mocks base method

func (*MockMutableSegment) Close

func (m *MockMutableSegment) Close() error

Close mocks base method

func (*MockMutableSegment) ContainsField added in v0.9.1

func (m *MockMutableSegment) ContainsField(field []byte) (bool, error)

ContainsField mocks base method

func (*MockMutableSegment) ContainsID

func (m *MockMutableSegment) ContainsID(docID []byte) (bool, error)

ContainsID mocks base method

func (*MockMutableSegment) Docs added in v0.5.0

func (m *MockMutableSegment) Docs() []doc.Document

Docs mocks base method

func (*MockMutableSegment) EXPECT

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

func (*MockMutableSegment) Fields

func (m *MockMutableSegment) Fields() (FieldsIterator, error)

Fields mocks base method

func (*MockMutableSegment) FieldsIterable added in v0.5.0

func (m *MockMutableSegment) FieldsIterable() FieldsIterable

FieldsIterable mocks base method

func (*MockMutableSegment) Insert

func (m *MockMutableSegment) Insert(d doc.Document) ([]byte, error)

Insert mocks base method

func (*MockMutableSegment) InsertBatch

func (m *MockMutableSegment) InsertBatch(b index.Batch) error

InsertBatch mocks base method

func (*MockMutableSegment) IsSealed

func (m *MockMutableSegment) IsSealed() bool

IsSealed mocks base method

func (*MockMutableSegment) Offset added in v0.5.0

func (m *MockMutableSegment) Offset() postings.ID

Offset mocks base method

func (*MockMutableSegment) Reader

func (m *MockMutableSegment) Reader() (index.Reader, error)

Reader mocks base method

func (*MockMutableSegment) Reset added in v0.5.0

func (m *MockMutableSegment) Reset(offset postings.ID)

Reset mocks base method

func (*MockMutableSegment) Seal

func (m *MockMutableSegment) Seal() error

Seal mocks base method

func (*MockMutableSegment) Size

func (m *MockMutableSegment) Size() int64

Size mocks base method

func (*MockMutableSegment) Terms

func (m *MockMutableSegment) Terms(field []byte) (TermsIterator, error)

Terms mocks base method

func (*MockMutableSegment) TermsIterable added in v0.5.0

func (m *MockMutableSegment) TermsIterable() TermsIterable

TermsIterable mocks base method

type MockMutableSegmentMockRecorder

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

MockMutableSegmentMockRecorder is the mock recorder for MockMutableSegment

func (*MockMutableSegmentMockRecorder) AllDocs added in v0.5.0

AllDocs indicates an expected call of AllDocs

func (*MockMutableSegmentMockRecorder) Close

Close indicates an expected call of Close

func (*MockMutableSegmentMockRecorder) ContainsField added in v0.9.1

func (mr *MockMutableSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call

ContainsField indicates an expected call of ContainsField

func (*MockMutableSegmentMockRecorder) ContainsID

func (mr *MockMutableSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call

ContainsID indicates an expected call of ContainsID

func (*MockMutableSegmentMockRecorder) Docs added in v0.5.0

Docs indicates an expected call of Docs

func (*MockMutableSegmentMockRecorder) Fields

Fields indicates an expected call of Fields

func (*MockMutableSegmentMockRecorder) FieldsIterable added in v0.5.0

func (mr *MockMutableSegmentMockRecorder) FieldsIterable() *gomock.Call

FieldsIterable indicates an expected call of FieldsIterable

func (*MockMutableSegmentMockRecorder) Insert

func (mr *MockMutableSegmentMockRecorder) Insert(d interface{}) *gomock.Call

Insert indicates an expected call of Insert

func (*MockMutableSegmentMockRecorder) InsertBatch

func (mr *MockMutableSegmentMockRecorder) InsertBatch(b interface{}) *gomock.Call

InsertBatch indicates an expected call of InsertBatch

func (*MockMutableSegmentMockRecorder) IsSealed

func (mr *MockMutableSegmentMockRecorder) IsSealed() *gomock.Call

IsSealed indicates an expected call of IsSealed

func (*MockMutableSegmentMockRecorder) Offset added in v0.5.0

Offset indicates an expected call of Offset

func (*MockMutableSegmentMockRecorder) Reader

Reader indicates an expected call of Reader

func (*MockMutableSegmentMockRecorder) Reset added in v0.5.0

func (mr *MockMutableSegmentMockRecorder) Reset(offset interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockMutableSegmentMockRecorder) Seal

Seal indicates an expected call of Seal

func (*MockMutableSegmentMockRecorder) Size

Size indicates an expected call of Size

func (*MockMutableSegmentMockRecorder) Terms

func (mr *MockMutableSegmentMockRecorder) Terms(field interface{}) *gomock.Call

Terms indicates an expected call of Terms

func (*MockMutableSegmentMockRecorder) TermsIterable added in v0.5.0

func (mr *MockMutableSegmentMockRecorder) TermsIterable() *gomock.Call

TermsIterable indicates an expected call of TermsIterable

type MockOrderedBytesIterator added in v0.9.0

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

MockOrderedBytesIterator is a mock of OrderedBytesIterator interface

func NewMockOrderedBytesIterator added in v0.9.0

func NewMockOrderedBytesIterator(ctrl *gomock.Controller) *MockOrderedBytesIterator

NewMockOrderedBytesIterator creates a new mock instance

func (*MockOrderedBytesIterator) Close added in v0.9.0

func (m *MockOrderedBytesIterator) Close() error

Close mocks base method

func (*MockOrderedBytesIterator) Current added in v0.9.0

func (m *MockOrderedBytesIterator) Current() []byte

Current mocks base method

func (*MockOrderedBytesIterator) EXPECT added in v0.9.0

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

func (*MockOrderedBytesIterator) Err added in v0.9.0

Err mocks base method

func (*MockOrderedBytesIterator) Next added in v0.9.0

func (m *MockOrderedBytesIterator) Next() bool

Next mocks base method

type MockOrderedBytesIteratorMockRecorder added in v0.9.0

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

MockOrderedBytesIteratorMockRecorder is the mock recorder for MockOrderedBytesIterator

func (*MockOrderedBytesIteratorMockRecorder) Close added in v0.9.0

Close indicates an expected call of Close

func (*MockOrderedBytesIteratorMockRecorder) Current added in v0.9.0

Current indicates an expected call of Current

func (*MockOrderedBytesIteratorMockRecorder) Err added in v0.9.0

Err indicates an expected call of Err

func (*MockOrderedBytesIteratorMockRecorder) Next added in v0.9.0

Next indicates an expected call of Next

type MockSegment

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

MockSegment is a mock of Segment interface

func NewMockSegment

func NewMockSegment(ctrl *gomock.Controller) *MockSegment

NewMockSegment creates a new mock instance

func (*MockSegment) Close

func (m *MockSegment) Close() error

Close mocks base method

func (*MockSegment) ContainsField added in v0.9.1

func (m *MockSegment) ContainsField(field []byte) (bool, error)

ContainsField mocks base method

func (*MockSegment) ContainsID

func (m *MockSegment) ContainsID(docID []byte) (bool, error)

ContainsID mocks base method

func (*MockSegment) EXPECT

func (m *MockSegment) EXPECT() *MockSegmentMockRecorder

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

func (*MockSegment) FieldsIterable added in v0.5.0

func (m *MockSegment) FieldsIterable() FieldsIterable

FieldsIterable mocks base method

func (*MockSegment) Reader

func (m *MockSegment) Reader() (index.Reader, error)

Reader mocks base method

func (*MockSegment) Size

func (m *MockSegment) Size() int64

Size mocks base method

func (*MockSegment) TermsIterable added in v0.5.0

func (m *MockSegment) TermsIterable() TermsIterable

TermsIterable mocks base method

type MockSegmentMockRecorder

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

MockSegmentMockRecorder is the mock recorder for MockSegment

func (*MockSegmentMockRecorder) Close

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

Close indicates an expected call of Close

func (*MockSegmentMockRecorder) ContainsField added in v0.9.1

func (mr *MockSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call

ContainsField indicates an expected call of ContainsField

func (*MockSegmentMockRecorder) ContainsID

func (mr *MockSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call

ContainsID indicates an expected call of ContainsID

func (*MockSegmentMockRecorder) FieldsIterable added in v0.5.0

func (mr *MockSegmentMockRecorder) FieldsIterable() *gomock.Call

FieldsIterable indicates an expected call of FieldsIterable

func (*MockSegmentMockRecorder) Reader

func (mr *MockSegmentMockRecorder) Reader() *gomock.Call

Reader indicates an expected call of Reader

func (*MockSegmentMockRecorder) Size

func (mr *MockSegmentMockRecorder) Size() *gomock.Call

Size indicates an expected call of Size

func (*MockSegmentMockRecorder) TermsIterable added in v0.5.0

func (mr *MockSegmentMockRecorder) TermsIterable() *gomock.Call

TermsIterable indicates an expected call of TermsIterable

type MockSegmentsBuilder added in v0.9.0

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

MockSegmentsBuilder is a mock of SegmentsBuilder interface

func NewMockSegmentsBuilder added in v0.9.0

func NewMockSegmentsBuilder(ctrl *gomock.Controller) *MockSegmentsBuilder

NewMockSegmentsBuilder creates a new mock instance

func (*MockSegmentsBuilder) AddSegments added in v0.9.0

func (m *MockSegmentsBuilder) AddSegments(segments []Segment) error

AddSegments mocks base method

func (*MockSegmentsBuilder) AllDocs added in v0.9.0

func (m *MockSegmentsBuilder) AllDocs() (index.IDDocIterator, error)

AllDocs mocks base method

func (*MockSegmentsBuilder) Docs added in v0.9.0

func (m *MockSegmentsBuilder) Docs() []doc.Document

Docs mocks base method

func (*MockSegmentsBuilder) EXPECT added in v0.9.0

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

func (*MockSegmentsBuilder) Fields added in v0.9.0

func (m *MockSegmentsBuilder) Fields() (FieldsIterator, error)

Fields mocks base method

func (*MockSegmentsBuilder) Reset added in v0.9.0

func (m *MockSegmentsBuilder) Reset(offset postings.ID)

Reset mocks base method

func (*MockSegmentsBuilder) Terms added in v0.9.0

func (m *MockSegmentsBuilder) Terms(field []byte) (TermsIterator, error)

Terms mocks base method

type MockSegmentsBuilderMockRecorder added in v0.9.0

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

MockSegmentsBuilderMockRecorder is the mock recorder for MockSegmentsBuilder

func (*MockSegmentsBuilderMockRecorder) AddSegments added in v0.9.0

func (mr *MockSegmentsBuilderMockRecorder) AddSegments(segments interface{}) *gomock.Call

AddSegments indicates an expected call of AddSegments

func (*MockSegmentsBuilderMockRecorder) AllDocs added in v0.9.0

AllDocs indicates an expected call of AllDocs

func (*MockSegmentsBuilderMockRecorder) Docs added in v0.9.0

Docs indicates an expected call of Docs

func (*MockSegmentsBuilderMockRecorder) Fields added in v0.9.0

Fields indicates an expected call of Fields

func (*MockSegmentsBuilderMockRecorder) Reset added in v0.9.0

func (mr *MockSegmentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockSegmentsBuilderMockRecorder) Terms added in v0.9.0

func (mr *MockSegmentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call

Terms indicates an expected call of Terms

type MockTermsIterable added in v0.9.0

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

MockTermsIterable is a mock of TermsIterable interface

func NewMockTermsIterable added in v0.9.0

func NewMockTermsIterable(ctrl *gomock.Controller) *MockTermsIterable

NewMockTermsIterable creates a new mock instance

func (*MockTermsIterable) EXPECT added in v0.9.0

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

func (*MockTermsIterable) Terms added in v0.9.0

func (m *MockTermsIterable) Terms(field []byte) (TermsIterator, error)

Terms mocks base method

type MockTermsIterableMockRecorder added in v0.9.0

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

MockTermsIterableMockRecorder is the mock recorder for MockTermsIterable

func (*MockTermsIterableMockRecorder) Terms added in v0.9.0

func (mr *MockTermsIterableMockRecorder) Terms(field interface{}) *gomock.Call

Terms indicates an expected call of Terms

type MockTermsIterator added in v0.9.0

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

MockTermsIterator is a mock of TermsIterator interface

func NewMockTermsIterator added in v0.9.0

func NewMockTermsIterator(ctrl *gomock.Controller) *MockTermsIterator

NewMockTermsIterator creates a new mock instance

func (*MockTermsIterator) Close added in v0.9.0

func (m *MockTermsIterator) Close() error

Close mocks base method

func (*MockTermsIterator) Current added in v0.9.0

func (m *MockTermsIterator) Current() ([]byte, postings.List)

Current mocks base method

func (*MockTermsIterator) EXPECT added in v0.9.0

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

func (*MockTermsIterator) Err added in v0.9.0

func (m *MockTermsIterator) Err() error

Err mocks base method

func (*MockTermsIterator) Next added in v0.9.0

func (m *MockTermsIterator) Next() bool

Next mocks base method

type MockTermsIteratorMockRecorder added in v0.9.0

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

MockTermsIteratorMockRecorder is the mock recorder for MockTermsIterator

func (*MockTermsIteratorMockRecorder) Close added in v0.9.0

Close indicates an expected call of Close

func (*MockTermsIteratorMockRecorder) Current added in v0.9.0

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

Current indicates an expected call of Current

func (*MockTermsIteratorMockRecorder) Err added in v0.9.0

Err indicates an expected call of Err

func (*MockTermsIteratorMockRecorder) Next added in v0.9.0

Next indicates an expected call of Next

type MutableSegment

type MutableSegment interface {
	Segment
	DocumentsBuilder

	// Offset returns the postings offset.
	Offset() postings.ID

	// Seal marks the Mutable Segment immutable.
	Seal() error

	// IsSealed returns true iff the segment is open and un-sealed.
	IsSealed() bool
}

MutableSegment is a segment which can be updated.

type OrderedBytesIterator added in v0.4.1

type OrderedBytesIterator interface {
	// Next returns a bool indicating if there are any more elements.
	Next() bool

	// Current returns the current element.
	// NB: the element returned is only valid until the subsequent call to Next().
	Current() []byte

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

	// Close releases any resources held by the iterator.
	Close() error
}

OrderedBytesIterator iterates over a collection of []bytes in lexicographical order.

var EmptyOrderedBytesIterator OrderedBytesIterator = emptyBytesIter{}

EmptyOrderedBytesIterator is an empty OrderedBytesIterator.

type Segment

type Segment interface {
	// FieldsIterable returns an iterable fields, for which is not
	// safe for concurrent use. For concurrent use call FieldsIterable
	// multiple times.
	FieldsIterable() FieldsIterable

	// TermsIterable returns an iterable terms, for which is not
	// safe for concurrent use. For concurrent use call TermsIterable
	// multiple times.
	TermsIterable() TermsIterable

	// Size returns the number of documents within the Segment. It returns
	// 0 if the Segment has been closed.
	Size() int64

	// ContainsID returns a bool indicating if the Segment contains the provided ID.
	ContainsID(docID []byte) (bool, error)

	// ContainsField returns a bool indicating if the Segment contains the provided field.
	ContainsField(field []byte) (bool, error)

	// Reader returns a point-in-time accessor to search the segment.
	Reader() (index.Reader, error)

	// Close closes the segment and releases any internal resources.
	Close() error
}

Segment is a sub-collection of documents within an index.

type SegmentsBuilder added in v0.5.0

type SegmentsBuilder interface {
	Builder

	// AddSegments adds segments to build from.
	AddSegments(segments []Segment) error
}

SegmentsBuilder is a builder that is built from segments.

type TermsIterable added in v0.5.0

type TermsIterable interface {
	// Terms returns an iterator over the known terms values for the given
	// field, in order by name, it is not valid for reading after mutating the
	// builder by inserting more documents.
	Terms(field []byte) (TermsIterator, error)
}

TermsIterable can iterate over segment terms, it is not by default concurrency safe.

type TermsIterator added in v0.4.1

type TermsIterator interface {
	// Next returns a bool indicating if there are any more elements.
	Next() bool

	// Current returns the current element.
	// NB: the element returned is only valid until the subsequent call to Next().
	Current() (term []byte, postings postings.List)

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

	// Close releases any resources held by the iterator.
	Close() error
}

TermsIterator iterates over all known terms for the provided field.

var EmptyTermsIterator TermsIterator = emptyTermsIter{}

EmptyTermsIterator is an empty EmptyTermsIterator.

Directories

Path Synopsis
fst
Package fst is a generated GoMock package.
Package fst is a generated GoMock package.
Package mem is a generated GoMock package.
Package mem is a generated GoMock package.

Jump to

Keyboard shortcuts

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