elastic

package
v0.0.0-...-82bf724 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEsIndexBody

func CreateEsIndexBody(mongoDoc *map[string]interface{}, esMapping *map[string]interface{}) map[string]interface{}

func CreateMapping

func CreateMapping(doc map[string]interface{}) map[string]interface{}
  • CreateMapping create Elastic Search Mapping from mongodb collection Example of mapping input: "mapping": { "title": { "es_type": "text" }, "slug": { "es_type": "keyword" } }

    Example of mapping output "properties": { "title": { "type": "text" } "slug": { "type": "keyword" } }

func SetupIndexAndMapping

func SetupIndexAndMapping(esOptions mongoes.ESOptions) error

SetupIndexAndMapping will Delete Index and Create new Mapping Beware, this will delete your current index and create new mapping

Types

type ElasticWorker

type ElasticWorker struct {
	JobQueue   chan elastic.BulkableRequest
	NumWorkers int

	EsOptions    mongoes.ESOptions
	IndexResults int32
	// contains filtered or unexported fields
}

func NewElasticWorker

func NewElasticWorker(jobQueue chan elastic.BulkableRequest, numWorkers int) *ElasticWorker

func (*ElasticWorker) DispatchWorkers

func (w *ElasticWorker) DispatchWorkers() chan struct{}

Jump to

Keyboard shortcuts

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