index

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	Idx bleve.Index
	// contains filtered or unexported fields
}

func New

func New(mapping string, opts *Options) (*Index, error)

func (*Index) BatchFlush

func (i *Index) BatchFlush() error

BatchFlush executes the current batch, and persists them to disk

func (*Index) Close

func (i *Index) Close() error

func (*Index) PostBatchWrite

func (i *Index) PostBatchWrite(namespace []byte, key int, value interface{}) error

func (*Index) PostDelete

func (i *Index) PostDelete(namespace []byte, key int) error

PostDelete will remove the key from the index

func (*Index) PostWrite

func (i *Index) PostWrite(namespace []byte, key int, value interface{}) error

PostWrite will write or update the

func (*Index) Search

func (i *Index) Search(query string) (*bleve.SearchResult, error)

Search leverages the built index to query for the query passed in

type Options

type Options struct {
	ReadOnly bool
}

Options for opening and creating an Index

Jump to

Keyboard shortcuts

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