Documentation ¶
Index ¶
- Constants
- Variables
- type BooleanField
- func (b *BooleanField) Analyze()
- func (b *BooleanField) AnalyzedLength() int
- func (b *BooleanField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (b *BooleanField) ArrayPositions() []uint64
- func (b *BooleanField) Boolean() (bool, error)
- func (b *BooleanField) EncodedFieldType() byte
- func (b *BooleanField) GoString() string
- func (b *BooleanField) Name() string
- func (b *BooleanField) NumPlainTextBytes() uint64
- func (b *BooleanField) Options() index.FieldIndexingOptions
- func (b *BooleanField) Size() int
- func (b *BooleanField) Value() []byte
- type CompositeField
- func (c *CompositeField) Analyze()
- func (c *CompositeField) AnalyzedLength() int
- func (c *CompositeField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (c *CompositeField) ArrayPositions() []uint64
- func (c *CompositeField) Compose(field string, length int, freq index.TokenFrequencies)
- func (c *CompositeField) EncodedFieldType() byte
- func (c *CompositeField) Name() string
- func (c *CompositeField) NumPlainTextBytes() uint64
- func (c *CompositeField) Options() index.FieldIndexingOptions
- func (c *CompositeField) Size() int
- func (c *CompositeField) Value() []byte
- type DateTimeField
- func NewDateTimeField(name string, arrayPositions []uint64, dt time.Time) (*DateTimeField, error)
- func NewDateTimeFieldFromBytes(name string, arrayPositions []uint64, value []byte) *DateTimeField
- func NewDateTimeFieldWithIndexingOptions(name string, arrayPositions []uint64, dt time.Time, ...) (*DateTimeField, error)
- func (n *DateTimeField) Analyze()
- func (n *DateTimeField) AnalyzedLength() int
- func (n *DateTimeField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (n *DateTimeField) ArrayPositions() []uint64
- func (n *DateTimeField) DateTime() (time.Time, error)
- func (n *DateTimeField) EncodedFieldType() byte
- func (n *DateTimeField) GoString() string
- func (n *DateTimeField) Name() string
- func (n *DateTimeField) NumPlainTextBytes() uint64
- func (n *DateTimeField) Options() index.FieldIndexingOptions
- func (n *DateTimeField) Size() int
- func (n *DateTimeField) Value() []byte
- type Document
- func (d *Document) AddField(f Field) *Document
- func (d *Document) AddIDField()
- func (d *Document) GoString() string
- func (d *Document) HasComposite() bool
- func (d *Document) ID() string
- func (d *Document) NumPlainTextBytes() uint64
- func (d *Document) SetID(id string)
- func (d *Document) Size() int
- func (d *Document) StoredFieldsBytes() uint64
- func (d *Document) VisitComposite(visitor index.CompositeFieldVisitor)
- func (d *Document) VisitFields(visitor index.FieldVisitor)
- type Field
- type GeoPointField
- func NewGeoPointField(name string, arrayPositions []uint64, lon, lat float64) *GeoPointField
- func NewGeoPointFieldFromBytes(name string, arrayPositions []uint64, value []byte) *GeoPointField
- func NewGeoPointFieldWithIndexingOptions(name string, arrayPositions []uint64, lon, lat float64, ...) *GeoPointField
- func (n *GeoPointField) Analyze()
- func (n *GeoPointField) AnalyzedLength() int
- func (n *GeoPointField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (n *GeoPointField) ArrayPositions() []uint64
- func (n *GeoPointField) EncodedFieldType() byte
- func (n *GeoPointField) GoString() string
- func (n *GeoPointField) Lat() (float64, error)
- func (n *GeoPointField) Lon() (float64, error)
- func (n *GeoPointField) Name() string
- func (n *GeoPointField) NumPlainTextBytes() uint64
- func (n *GeoPointField) Options() index.FieldIndexingOptions
- func (n *GeoPointField) SetSpatialAnalyzerPlugin(plugin index.SpatialAnalyzerPlugin)
- func (n *GeoPointField) Size() int
- func (n *GeoPointField) Value() []byte
- type GeoShapeField
- func NewGeoCircleFieldWithIndexingOptions(name string, arrayPositions []uint64, centerPoint []float64, radius string, ...) *GeoShapeField
- func NewGeoShapeField(name string, arrayPositions []uint64, coordinates [][][][]float64, typ string) *GeoShapeField
- func NewGeoShapeFieldFromBytes(name string, arrayPositions []uint64, value []byte) *GeoShapeField
- func NewGeoShapeFieldWithIndexingOptions(name string, arrayPositions []uint64, coordinates [][][][]float64, typ string, ...) *GeoShapeField
- func NewGeometryCollectionFieldWithIndexingOptions(name string, arrayPositions []uint64, coordinates [][][][][]float64, ...) *GeoShapeField
- func (n *GeoShapeField) Analyze()
- func (n *GeoShapeField) AnalyzedLength() int
- func (n *GeoShapeField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (n *GeoShapeField) ArrayPositions() []uint64
- func (n *GeoShapeField) EncodedFieldType() byte
- func (n *GeoShapeField) GeoShape() (index.GeoJSON, error)
- func (n *GeoShapeField) GoString() string
- func (n *GeoShapeField) Name() string
- func (n *GeoShapeField) NumPlainTextBytes() uint64
- func (n *GeoShapeField) Options() index.FieldIndexingOptions
- func (n *GeoShapeField) Size() int
- func (n *GeoShapeField) Value() []byte
- type IPField
- func (b *IPField) Analyze()
- func (n *IPField) AnalyzedLength() int
- func (n *IPField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (b *IPField) ArrayPositions() []uint64
- func (n *IPField) EncodedFieldType() byte
- func (b *IPField) GoString() string
- func (b *IPField) IP() (net.IP, error)
- func (b *IPField) Name() string
- func (b *IPField) NumPlainTextBytes() uint64
- func (b *IPField) Options() index.FieldIndexingOptions
- func (b *IPField) Size() int
- func (b *IPField) Value() []byte
- type NumericField
- func (n *NumericField) Analyze()
- func (n *NumericField) AnalyzedLength() int
- func (n *NumericField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (n *NumericField) ArrayPositions() []uint64
- func (n *NumericField) EncodedFieldType() byte
- func (n *NumericField) GoString() string
- func (n *NumericField) Name() string
- func (n *NumericField) NumPlainTextBytes() uint64
- func (n *NumericField) Number() (float64, error)
- func (n *NumericField) Options() index.FieldIndexingOptions
- func (n *NumericField) Size() int
- func (n *NumericField) Value() []byte
- type TextField
- func NewTextField(name string, arrayPositions []uint64, value []byte) *TextField
- func NewTextFieldCustom(name string, arrayPositions []uint64, value []byte, ...) *TextField
- func NewTextFieldWithAnalyzer(name string, arrayPositions []uint64, value []byte, analyzer analysis.Analyzer) *TextField
- func NewTextFieldWithIndexingOptions(name string, arrayPositions []uint64, value []byte, ...) *TextField
- func (t *TextField) Analyze()
- func (t *TextField) AnalyzedLength() int
- func (t *TextField) AnalyzedTokenFrequencies() index.TokenFrequencies
- func (t *TextField) Analyzer() analysis.Analyzer
- func (t *TextField) ArrayPositions() []uint64
- func (t *TextField) EncodedFieldType() byte
- func (t *TextField) GoString() string
- func (t *TextField) Name() string
- func (t *TextField) NumPlainTextBytes() uint64
- func (t *TextField) Options() index.FieldIndexingOptions
- func (t *TextField) Size() int
- func (t *TextField) Text() string
- func (t *TextField) Value() []byte
Constants ¶
View Source
const DefaultBooleanIndexingOptions = index.StoreField | index.IndexField | index.DocValues
View Source
const DefaultCompositeIndexingOptions = index.IndexField
View Source
const DefaultDateTimeIndexingOptions = index.StoreField | index.IndexField | index.DocValues
View Source
const DefaultDateTimePrecisionStep uint = 4
View Source
const DefaultGeoShapeIndexingOptions = index.IndexField | index.DocValues
View Source
const DefaultIPIndexingOptions = index.StoreField | index.IndexField | index.DocValues | index.IncludeTermVectors
View Source
const DefaultNumericIndexingOptions = index.StoreField | index.IndexField | index.DocValues
View Source
const DefaultPrecisionStep uint = 4
View Source
const DefaultTextIndexingOptions = index.IndexField | index.DocValues
Variables ¶
View Source
var GeoPrecisionStep uint = 9
View Source
var MaxTimeRepresentable = time.Unix(0, math.MaxInt64)
View Source
var MinTimeRepresentable = time.Unix(0, math.MinInt64)
Functions ¶
This section is empty.
Types ¶
type BooleanField ¶
type BooleanField struct {
// contains filtered or unexported fields
}
func NewBooleanField ¶
func NewBooleanField(name string, arrayPositions []uint64, b bool) *BooleanField
func NewBooleanFieldFromBytes ¶
func NewBooleanFieldFromBytes(name string, arrayPositions []uint64, value []byte) *BooleanField
func NewBooleanFieldWithIndexingOptions ¶
func NewBooleanFieldWithIndexingOptions(name string, arrayPositions []uint64, b bool, options index.FieldIndexingOptions) *BooleanField
func (*BooleanField) Analyze ¶
func (b *BooleanField) Analyze()
func (*BooleanField) AnalyzedLength ¶
func (b *BooleanField) AnalyzedLength() int
func (*BooleanField) AnalyzedTokenFrequencies ¶
func (b *BooleanField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*BooleanField) ArrayPositions ¶
func (b *BooleanField) ArrayPositions() []uint64
func (*BooleanField) Boolean ¶
func (b *BooleanField) Boolean() (bool, error)
func (*BooleanField) EncodedFieldType ¶
func (b *BooleanField) EncodedFieldType() byte
func (*BooleanField) GoString ¶
func (b *BooleanField) GoString() string
func (*BooleanField) Name ¶
func (b *BooleanField) Name() string
func (*BooleanField) NumPlainTextBytes ¶
func (b *BooleanField) NumPlainTextBytes() uint64
func (*BooleanField) Options ¶
func (b *BooleanField) Options() index.FieldIndexingOptions
func (*BooleanField) Size ¶
func (b *BooleanField) Size() int
func (*BooleanField) Value ¶
func (b *BooleanField) Value() []byte
type CompositeField ¶
type CompositeField struct {
// contains filtered or unexported fields
}
func NewCompositeField ¶
func NewCompositeField(name string, defaultInclude bool, include []string, exclude []string) *CompositeField
func NewCompositeFieldWithIndexingOptions ¶
func NewCompositeFieldWithIndexingOptions(name string, defaultInclude bool, include []string, exclude []string, options index.FieldIndexingOptions) *CompositeField
func (*CompositeField) Analyze ¶
func (c *CompositeField) Analyze()
func (*CompositeField) AnalyzedLength ¶
func (c *CompositeField) AnalyzedLength() int
func (*CompositeField) AnalyzedTokenFrequencies ¶
func (c *CompositeField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*CompositeField) ArrayPositions ¶
func (c *CompositeField) ArrayPositions() []uint64
func (*CompositeField) Compose ¶
func (c *CompositeField) Compose(field string, length int, freq index.TokenFrequencies)
func (*CompositeField) EncodedFieldType ¶
func (c *CompositeField) EncodedFieldType() byte
func (*CompositeField) Name ¶
func (c *CompositeField) Name() string
func (*CompositeField) NumPlainTextBytes ¶
func (c *CompositeField) NumPlainTextBytes() uint64
func (*CompositeField) Options ¶
func (c *CompositeField) Options() index.FieldIndexingOptions
func (*CompositeField) Size ¶
func (c *CompositeField) Size() int
func (*CompositeField) Value ¶
func (c *CompositeField) Value() []byte
type DateTimeField ¶
type DateTimeField struct {
// contains filtered or unexported fields
}
func NewDateTimeField ¶
func NewDateTimeFieldFromBytes ¶
func NewDateTimeFieldFromBytes(name string, arrayPositions []uint64, value []byte) *DateTimeField
func NewDateTimeFieldWithIndexingOptions ¶
func NewDateTimeFieldWithIndexingOptions(name string, arrayPositions []uint64, dt time.Time, options index.FieldIndexingOptions) (*DateTimeField, error)
func (*DateTimeField) Analyze ¶
func (n *DateTimeField) Analyze()
func (*DateTimeField) AnalyzedLength ¶
func (n *DateTimeField) AnalyzedLength() int
func (*DateTimeField) AnalyzedTokenFrequencies ¶
func (n *DateTimeField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*DateTimeField) ArrayPositions ¶
func (n *DateTimeField) ArrayPositions() []uint64
func (*DateTimeField) EncodedFieldType ¶
func (n *DateTimeField) EncodedFieldType() byte
func (*DateTimeField) GoString ¶
func (n *DateTimeField) GoString() string
func (*DateTimeField) Name ¶
func (n *DateTimeField) Name() string
func (*DateTimeField) NumPlainTextBytes ¶
func (n *DateTimeField) NumPlainTextBytes() uint64
func (*DateTimeField) Options ¶
func (n *DateTimeField) Options() index.FieldIndexingOptions
func (*DateTimeField) Size ¶
func (n *DateTimeField) Size() int
func (*DateTimeField) Value ¶
func (n *DateTimeField) Value() []byte
type Document ¶
type Document struct { Fields []Field `json:"fields"` CompositeFields []*CompositeField StoredFieldsSize uint64 // contains filtered or unexported fields }
func NewDocument ¶
func (*Document) AddIDField ¶
func (d *Document) AddIDField()
func (*Document) HasComposite ¶
func (*Document) NumPlainTextBytes ¶
func (*Document) StoredFieldsBytes ¶ added in v2.3.6
func (*Document) VisitComposite ¶
func (d *Document) VisitComposite(visitor index.CompositeFieldVisitor)
func (*Document) VisitFields ¶
func (d *Document) VisitFields(visitor index.FieldVisitor)
type Field ¶
type Field interface { // Name returns the path of the field from the root DocumentMapping. // A root field path is "field", a subdocument field is "parent.field". Name() string // ArrayPositions returns the intermediate document and field indices // required to resolve the field value in the document. For example, if the // field path is "doc1.doc2.field" where doc1 and doc2 are slices or // arrays, ArrayPositions returns 2 indices used to resolve "doc2" value in // "doc1", then "field" in "doc2". ArrayPositions() []uint64 Options() index.FieldIndexingOptions Analyze() Value() []byte // NumPlainTextBytes should return the number of plain text bytes // that this field represents - this is a common metric for tracking // the rate of indexing NumPlainTextBytes() uint64 Size() int EncodedFieldType() byte AnalyzedLength() int AnalyzedTokenFrequencies() index.TokenFrequencies }
type GeoPointField ¶
type GeoPointField struct {
// contains filtered or unexported fields
}
func NewGeoPointField ¶
func NewGeoPointField(name string, arrayPositions []uint64, lon, lat float64) *GeoPointField
func NewGeoPointFieldFromBytes ¶
func NewGeoPointFieldFromBytes(name string, arrayPositions []uint64, value []byte) *GeoPointField
func NewGeoPointFieldWithIndexingOptions ¶
func NewGeoPointFieldWithIndexingOptions(name string, arrayPositions []uint64, lon, lat float64, options index.FieldIndexingOptions) *GeoPointField
func (*GeoPointField) Analyze ¶
func (n *GeoPointField) Analyze()
func (*GeoPointField) AnalyzedLength ¶
func (n *GeoPointField) AnalyzedLength() int
func (*GeoPointField) AnalyzedTokenFrequencies ¶
func (n *GeoPointField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*GeoPointField) ArrayPositions ¶
func (n *GeoPointField) ArrayPositions() []uint64
func (*GeoPointField) EncodedFieldType ¶
func (n *GeoPointField) EncodedFieldType() byte
func (*GeoPointField) GoString ¶
func (n *GeoPointField) GoString() string
func (*GeoPointField) Lat ¶
func (n *GeoPointField) Lat() (float64, error)
func (*GeoPointField) Lon ¶
func (n *GeoPointField) Lon() (float64, error)
func (*GeoPointField) Name ¶
func (n *GeoPointField) Name() string
func (*GeoPointField) NumPlainTextBytes ¶
func (n *GeoPointField) NumPlainTextBytes() uint64
func (*GeoPointField) Options ¶
func (n *GeoPointField) Options() index.FieldIndexingOptions
func (*GeoPointField) SetSpatialAnalyzerPlugin ¶ added in v2.3.3
func (n *GeoPointField) SetSpatialAnalyzerPlugin( plugin index.SpatialAnalyzerPlugin)
SetSpatialAnalyzerPlugin implements the index.TokenisableSpatialField interface.
func (*GeoPointField) Size ¶
func (n *GeoPointField) Size() int
func (*GeoPointField) Value ¶
func (n *GeoPointField) Value() []byte
type GeoShapeField ¶ added in v2.3.3
type GeoShapeField struct {
// contains filtered or unexported fields
}
func NewGeoCircleFieldWithIndexingOptions ¶ added in v2.3.3
func NewGeoCircleFieldWithIndexingOptions(name string, arrayPositions []uint64, centerPoint []float64, radius string, options index.FieldIndexingOptions) *GeoShapeField
func NewGeoShapeField ¶ added in v2.3.3
func NewGeoShapeField(name string, arrayPositions []uint64, coordinates [][][][]float64, typ string) *GeoShapeField
func NewGeoShapeFieldFromBytes ¶ added in v2.3.4
func NewGeoShapeFieldFromBytes(name string, arrayPositions []uint64, value []byte) *GeoShapeField
func NewGeoShapeFieldWithIndexingOptions ¶ added in v2.3.3
func NewGeoShapeFieldWithIndexingOptions(name string, arrayPositions []uint64, coordinates [][][][]float64, typ string, options index.FieldIndexingOptions) *GeoShapeField
func NewGeometryCollectionFieldWithIndexingOptions ¶ added in v2.3.3
func NewGeometryCollectionFieldWithIndexingOptions(name string, arrayPositions []uint64, coordinates [][][][][]float64, types []string, options index.FieldIndexingOptions) *GeoShapeField
func (*GeoShapeField) Analyze ¶ added in v2.3.3
func (n *GeoShapeField) Analyze()
func (*GeoShapeField) AnalyzedLength ¶ added in v2.3.3
func (n *GeoShapeField) AnalyzedLength() int
func (*GeoShapeField) AnalyzedTokenFrequencies ¶ added in v2.3.3
func (n *GeoShapeField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*GeoShapeField) ArrayPositions ¶ added in v2.3.3
func (n *GeoShapeField) ArrayPositions() []uint64
func (*GeoShapeField) EncodedFieldType ¶ added in v2.3.3
func (n *GeoShapeField) EncodedFieldType() byte
func (*GeoShapeField) GeoShape ¶ added in v2.3.4
func (n *GeoShapeField) GeoShape() (index.GeoJSON, error)
GeoShape is an implementation of the index.GeoShapeField interface.
func (*GeoShapeField) GoString ¶ added in v2.3.3
func (n *GeoShapeField) GoString() string
func (*GeoShapeField) Name ¶ added in v2.3.3
func (n *GeoShapeField) Name() string
func (*GeoShapeField) NumPlainTextBytes ¶ added in v2.3.3
func (n *GeoShapeField) NumPlainTextBytes() uint64
func (*GeoShapeField) Options ¶ added in v2.3.3
func (n *GeoShapeField) Options() index.FieldIndexingOptions
func (*GeoShapeField) Size ¶ added in v2.3.3
func (n *GeoShapeField) Size() int
func (*GeoShapeField) Value ¶ added in v2.3.3
func (n *GeoShapeField) Value() []byte
type IPField ¶ added in v2.3.0
type IPField struct {
// contains filtered or unexported fields
}
func NewIPField ¶ added in v2.3.0
func NewIPFieldFromBytes ¶ added in v2.3.0
func NewIPFieldWithIndexingOptions ¶ added in v2.3.0
func (*IPField) AnalyzedLength ¶ added in v2.3.0
func (*IPField) AnalyzedTokenFrequencies ¶ added in v2.3.0
func (n *IPField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*IPField) ArrayPositions ¶ added in v2.3.0
func (*IPField) EncodedFieldType ¶ added in v2.3.0
func (*IPField) NumPlainTextBytes ¶ added in v2.3.0
func (*IPField) Options ¶ added in v2.3.0
func (b *IPField) Options() index.FieldIndexingOptions
type NumericField ¶
type NumericField struct {
// contains filtered or unexported fields
}
func NewNumericField ¶
func NewNumericField(name string, arrayPositions []uint64, number float64) *NumericField
func NewNumericFieldFromBytes ¶
func NewNumericFieldFromBytes(name string, arrayPositions []uint64, value []byte) *NumericField
func NewNumericFieldWithIndexingOptions ¶
func NewNumericFieldWithIndexingOptions(name string, arrayPositions []uint64, number float64, options index.FieldIndexingOptions) *NumericField
func (*NumericField) Analyze ¶
func (n *NumericField) Analyze()
func (*NumericField) AnalyzedLength ¶
func (n *NumericField) AnalyzedLength() int
func (*NumericField) AnalyzedTokenFrequencies ¶
func (n *NumericField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*NumericField) ArrayPositions ¶
func (n *NumericField) ArrayPositions() []uint64
func (*NumericField) EncodedFieldType ¶
func (n *NumericField) EncodedFieldType() byte
func (*NumericField) GoString ¶
func (n *NumericField) GoString() string
func (*NumericField) Name ¶
func (n *NumericField) Name() string
func (*NumericField) NumPlainTextBytes ¶
func (n *NumericField) NumPlainTextBytes() uint64
func (*NumericField) Number ¶
func (n *NumericField) Number() (float64, error)
func (*NumericField) Options ¶
func (n *NumericField) Options() index.FieldIndexingOptions
func (*NumericField) Size ¶
func (n *NumericField) Size() int
func (*NumericField) Value ¶
func (n *NumericField) Value() []byte
type TextField ¶
type TextField struct {
// contains filtered or unexported fields
}
func NewTextField ¶
func NewTextFieldCustom ¶
func (*TextField) AnalyzedLength ¶
func (*TextField) AnalyzedTokenFrequencies ¶
func (t *TextField) AnalyzedTokenFrequencies() index.TokenFrequencies
func (*TextField) ArrayPositions ¶
func (*TextField) EncodedFieldType ¶
func (*TextField) NumPlainTextBytes ¶
func (*TextField) Options ¶
func (t *TextField) Options() index.FieldIndexingOptions
Click to show internal directories.
Click to hide internal directories.