index

package
v0.0.0-...-609c32c Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseDataDir

func UseDataDir(dataDirectoryPath string) func(*Index)

UseDataDir specify data directory to be used by balasticsearch

Types

type IIndex

type IIndex interface {
	Get() (map[string]Info, error)
	Create() error
	UpdateAlias(string, string) error
}

IIndex interface for index

type Index

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

Index is the entry point for all index operation like creating, deleting and updating alias

func New

func New(indexRegistry *registry.IndexRegistry, options ...func(*Index)) (I *Index, err error)

New initialize new instance of index api

func (*Index) Create

func (I *Index) Create(name string, mappingJSON string) (err error)

Create instantiates and index

func (*Index) Get

func (I *Index) Get(name string) (infos map[string]Info, err error)

Get get index information

type Info

type Info struct {
	Aliases map[string]interface{}          `json:"aliases"`
	Types   map[string]mapping.IndexMapping `json:"Mappings"`
}

Info hold index information

Jump to

Keyboard shortcuts

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