Documentation ¶
Index ¶
- type Builder
- type BuilderOptions
- func (o *BuilderOptions) FieldBuilderOptions() *indexfield.DocsFieldBuilderOptions
- func (o *BuilderOptions) FieldHashFn() hash.StringArrayHashFn
- func (o *BuilderOptions) RawDocSourceFieldPath() []string
- func (o *BuilderOptions) SetFieldBuilderOptions(v *indexfield.DocsFieldBuilderOptions) *BuilderOptions
- func (o *BuilderOptions) SetFieldHashFn(v hash.StringArrayHashFn) *BuilderOptions
- func (o *BuilderOptions) SetRawDocSourceFieldPath(v []string) *BuilderOptions
- func (o *BuilderOptions) SetTimestampFieldPath(v []string) *BuilderOptions
- func (o *BuilderOptions) TimestampFieldPath() []string
- type Field
- type FieldFn
- type FieldPathPredicate
- type ImmutableSegment
- type Metadata
- type MutableSegment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface { // AddBatch adds a batch of documents to the segment. AddBatch(docs document.Documents) // Build returns a segment built from data accumulated in the builder. // The builder should not be used after `Build` is called. Build() MutableSegment }
Builder builds a segment.
func NewBuilder ¶
func NewBuilder(opts *BuilderOptions) Builder
NewBuilder creates a new segment builder.
type BuilderOptions ¶
type BuilderOptions struct {
// contains filtered or unexported fields
}
BuilderOptions provide a set of builder options.
func NewBuilderOptions ¶
func NewBuilderOptions() *BuilderOptions
NewBuilderOptions create a new set of builder options.
func (*BuilderOptions) FieldBuilderOptions ¶
func (o *BuilderOptions) FieldBuilderOptions() *indexfield.DocsFieldBuilderOptions
FieldBuilderOptions returns the field builder options.
func (*BuilderOptions) FieldHashFn ¶
func (o *BuilderOptions) FieldHashFn() hash.StringArrayHashFn
FieldHashFn returns the function that computes the hash of a field path.
func (*BuilderOptions) RawDocSourceFieldPath ¶
func (o *BuilderOptions) RawDocSourceFieldPath() []string
RawDocSourceFieldPath returns the raw doc source field path.
func (*BuilderOptions) SetFieldBuilderOptions ¶
func (o *BuilderOptions) SetFieldBuilderOptions(v *indexfield.DocsFieldBuilderOptions) *BuilderOptions
SetFieldBuilderOptions sets the field builder options.
func (*BuilderOptions) SetFieldHashFn ¶
func (o *BuilderOptions) SetFieldHashFn(v hash.StringArrayHashFn) *BuilderOptions
SetFieldHashFn sets the function that computes the hash of a field path.
func (*BuilderOptions) SetRawDocSourceFieldPath ¶
func (o *BuilderOptions) SetRawDocSourceFieldPath(v []string) *BuilderOptions
SetRawDocSourceFieldPath sets the raw doc source field path.
func (*BuilderOptions) SetTimestampFieldPath ¶
func (o *BuilderOptions) SetTimestampFieldPath(v []string) *BuilderOptions
SetTimestampFieldPath sets the timestamp field path.
func (*BuilderOptions) TimestampFieldPath ¶
func (o *BuilderOptions) TimestampFieldPath() []string
TimestampFieldPath returns the timestamp field path.
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field contains a field along with its types and value metadatas.
func (*Field) DocsField ¶
func (f *Field) DocsField() indexfield.DocsField
DocsField returns the raw document field. If the raw docs field is not nil, its refcount is incremented, and the returned docs field should be closed after use. Otherwise, nil is returned.
func (*Field) Insert ¶
func (f *Field) Insert(df indexfield.DocsField)
Insert inserts the incoming docs field into the segment field object. The incoming docs field remains valid after the merge and should be closed where appropriate.
func (*Field) ValueMetas ¶
ValueMetas contains the list of value metas.
type FieldPathPredicate ¶
FieldPathPredicate is a predicate on the given field path.
type ImmutableSegment ¶
type ImmutableSegment interface { // FieldAt returns the field at a given path. FieldAt(fieldPath []string) (*Field, bool) // ForEach performs an operation against each segment field. ForEach(fn FieldFn) // contains filtered or unexported methods }
ImmutableSegment is an immutable segment.
type Metadata ¶
type Metadata struct { ID string NumDocs int32 NumFields int MinTimeNanos int64 MaxTimeNanos int64 }
Metadata stores the segment metadata.
type MutableSegment ¶
type MutableSegment interface { ImmutableSegment // ClearAll clears all fields in the segment. ClearAll() }
MutableSegment is a mutable segment.