bleve: github.com/blevesearch/bleve/document Index | Files

package document

import "github.com/blevesearch/bleve/document"

Index

Package Files

document.go field.go field_boolean.go field_composite.go field_datetime.go field_geopoint.go field_numeric.go field_text.go indexing_options.go

Constants

const DefaultBooleanIndexingOptions = StoreField | IndexField
const DefaultCompositeIndexingOptions = IndexField
const DefaultDateTimeIndexingOptions = StoreField | IndexField
const DefaultDateTimePrecisionStep uint = 4
const DefaultNumericIndexingOptions = StoreField | IndexField
const DefaultPrecisionStep uint = 4
const DefaultTextIndexingOptions = IndexField

Variables

var GeoPrecisionStep uint = 9
var MaxTimeRepresentable = time.Unix(0, math.MaxInt64)
var MinTimeRepresentable = time.Unix(0, math.MinInt64)

type BooleanField Uses

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

func NewBooleanField Uses

func NewBooleanField(name string, arrayPositions []uint64, b bool) *BooleanField

func NewBooleanFieldFromBytes Uses

func NewBooleanFieldFromBytes(name string, arrayPositions []uint64, value []byte) *BooleanField

func NewBooleanFieldWithIndexingOptions Uses

func NewBooleanFieldWithIndexingOptions(name string, arrayPositions []uint64, b bool, options IndexingOptions) *BooleanField

func (*BooleanField) Analyze Uses

func (b *BooleanField) Analyze() (int, analysis.TokenFrequencies)

func (*BooleanField) ArrayPositions Uses

func (b *BooleanField) ArrayPositions() []uint64

func (*BooleanField) Boolean Uses

func (b *BooleanField) Boolean() (bool, error)

func (*BooleanField) GoString Uses

func (b *BooleanField) GoString() string

func (*BooleanField) Name Uses

func (b *BooleanField) Name() string

func (*BooleanField) NumPlainTextBytes Uses

func (b *BooleanField) NumPlainTextBytes() uint64

func (*BooleanField) Options Uses

func (b *BooleanField) Options() IndexingOptions

func (*BooleanField) Value Uses

func (b *BooleanField) Value() []byte

type CompositeField Uses

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

func NewCompositeField Uses

func NewCompositeField(name string, defaultInclude bool, include []string, exclude []string) *CompositeField

func NewCompositeFieldWithIndexingOptions Uses

func NewCompositeFieldWithIndexingOptions(name string, defaultInclude bool, include []string, exclude []string, options IndexingOptions) *CompositeField

func (*CompositeField) Analyze Uses

func (c *CompositeField) Analyze() (int, analysis.TokenFrequencies)

func (*CompositeField) ArrayPositions Uses

func (c *CompositeField) ArrayPositions() []uint64

func (*CompositeField) Compose Uses

func (c *CompositeField) Compose(field string, length int, freq analysis.TokenFrequencies)

func (*CompositeField) Name Uses

func (c *CompositeField) Name() string

func (*CompositeField) NumPlainTextBytes Uses

func (c *CompositeField) NumPlainTextBytes() uint64

func (*CompositeField) Options Uses

func (c *CompositeField) Options() IndexingOptions

func (*CompositeField) Value Uses

func (c *CompositeField) Value() []byte

type DateTimeField Uses

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

func NewDateTimeField Uses

func NewDateTimeField(name string, arrayPositions []uint64, dt time.Time) (*DateTimeField, error)

func NewDateTimeFieldFromBytes Uses

func NewDateTimeFieldFromBytes(name string, arrayPositions []uint64, value []byte) *DateTimeField

func NewDateTimeFieldWithIndexingOptions Uses

func NewDateTimeFieldWithIndexingOptions(name string, arrayPositions []uint64, dt time.Time, options IndexingOptions) (*DateTimeField, error)

func (*DateTimeField) Analyze Uses

func (n *DateTimeField) Analyze() (int, analysis.TokenFrequencies)

func (*DateTimeField) ArrayPositions Uses

func (n *DateTimeField) ArrayPositions() []uint64

func (*DateTimeField) DateTime Uses

func (n *DateTimeField) DateTime() (time.Time, error)

func (*DateTimeField) GoString Uses

func (n *DateTimeField) GoString() string

func (*DateTimeField) Name Uses

func (n *DateTimeField) Name() string

func (*DateTimeField) NumPlainTextBytes Uses

func (n *DateTimeField) NumPlainTextBytes() uint64

func (*DateTimeField) Options Uses

func (n *DateTimeField) Options() IndexingOptions

func (*DateTimeField) Value Uses

func (n *DateTimeField) Value() []byte

type Document Uses

type Document struct {
    ID              string  `json:"id"`
    Fields          []Field `json:"fields"`
    CompositeFields []*CompositeField
}

func NewDocument Uses

func NewDocument(id string) *Document

func (*Document) AddField Uses

func (d *Document) AddField(f Field) *Document

func (*Document) GoString Uses

func (d *Document) GoString() string

func (*Document) NumPlainTextBytes Uses

func (d *Document) NumPlainTextBytes() uint64

type Field Uses

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() IndexingOptions
    Analyze() (int, analysis.TokenFrequencies)
    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
}

type GeoPointField Uses

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

func NewGeoPointField Uses

func NewGeoPointField(name string, arrayPositions []uint64, lon, lat float64) *GeoPointField

func NewGeoPointFieldFromBytes Uses

func NewGeoPointFieldFromBytes(name string, arrayPositions []uint64, value []byte) *GeoPointField

func NewGeoPointFieldWithIndexingOptions Uses

func NewGeoPointFieldWithIndexingOptions(name string, arrayPositions []uint64, lon, lat float64, options IndexingOptions) *GeoPointField

func (*GeoPointField) Analyze Uses

func (n *GeoPointField) Analyze() (int, analysis.TokenFrequencies)

func (*GeoPointField) ArrayPositions Uses

func (n *GeoPointField) ArrayPositions() []uint64

func (*GeoPointField) GoString Uses

func (n *GeoPointField) GoString() string

func (*GeoPointField) Lat Uses

func (n *GeoPointField) Lat() (float64, error)

func (*GeoPointField) Lon Uses

func (n *GeoPointField) Lon() (float64, error)

func (*GeoPointField) Name Uses

func (n *GeoPointField) Name() string

func (*GeoPointField) NumPlainTextBytes Uses

func (n *GeoPointField) NumPlainTextBytes() uint64

func (*GeoPointField) Options Uses

func (n *GeoPointField) Options() IndexingOptions

func (*GeoPointField) Value Uses

func (n *GeoPointField) Value() []byte

type IndexingOptions Uses

type IndexingOptions int
const (
    IndexField IndexingOptions = 1 << iota
    StoreField
    IncludeTermVectors
)

func (IndexingOptions) IncludeTermVectors Uses

func (o IndexingOptions) IncludeTermVectors() bool

func (IndexingOptions) IsIndexed Uses

func (o IndexingOptions) IsIndexed() bool

func (IndexingOptions) IsStored Uses

func (o IndexingOptions) IsStored() bool

func (IndexingOptions) String Uses

func (o IndexingOptions) String() string

type NumericField Uses

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

func NewNumericField Uses

func NewNumericField(name string, arrayPositions []uint64, number float64) *NumericField

func NewNumericFieldFromBytes Uses

func NewNumericFieldFromBytes(name string, arrayPositions []uint64, value []byte) *NumericField

func NewNumericFieldWithIndexingOptions Uses

func NewNumericFieldWithIndexingOptions(name string, arrayPositions []uint64, number float64, options IndexingOptions) *NumericField

func (*NumericField) Analyze Uses

func (n *NumericField) Analyze() (int, analysis.TokenFrequencies)

func (*NumericField) ArrayPositions Uses

func (n *NumericField) ArrayPositions() []uint64

func (*NumericField) GoString Uses

func (n *NumericField) GoString() string

func (*NumericField) Name Uses

func (n *NumericField) Name() string

func (*NumericField) NumPlainTextBytes Uses

func (n *NumericField) NumPlainTextBytes() uint64

func (*NumericField) Number Uses

func (n *NumericField) Number() (float64, error)

func (*NumericField) Options Uses

func (n *NumericField) Options() IndexingOptions

func (*NumericField) Value Uses

func (n *NumericField) Value() []byte

type TextField Uses

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

func NewTextField Uses

func NewTextField(name string, arrayPositions []uint64, value []byte) *TextField

func NewTextFieldCustom Uses

func NewTextFieldCustom(name string, arrayPositions []uint64, value []byte, options IndexingOptions, analyzer *analysis.Analyzer) *TextField

func NewTextFieldWithAnalyzer Uses

func NewTextFieldWithAnalyzer(name string, arrayPositions []uint64, value []byte, analyzer *analysis.Analyzer) *TextField

func NewTextFieldWithIndexingOptions Uses

func NewTextFieldWithIndexingOptions(name string, arrayPositions []uint64, value []byte, options IndexingOptions) *TextField

func (*TextField) Analyze Uses

func (t *TextField) Analyze() (int, analysis.TokenFrequencies)

func (*TextField) ArrayPositions Uses

func (t *TextField) ArrayPositions() []uint64

func (*TextField) GoString Uses

func (t *TextField) GoString() string

func (*TextField) Name Uses

func (t *TextField) Name() string

func (*TextField) NumPlainTextBytes Uses

func (t *TextField) NumPlainTextBytes() uint64

func (*TextField) Options Uses

func (t *TextField) Options() IndexingOptions

func (*TextField) Value Uses

func (t *TextField) Value() []byte

Package document imports 6 packages (graph) and is imported by 147 packages. Updated 2017-08-25. Refresh now. Tools for package owners.