commands

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = cli.Commands{
	{
		Name:   "index",
		Usage:  "Index collection to elasticsearch",
		Action: IndexMongoToES,
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "config",
				Value: "",
				Usage: "Configuration file path",
			},
			cli.IntFlag{
				Name:  "workers",
				Value: 2,
				Usage: "Number of workers to index the mongo collection",
			},
			cli.IntFlag{
				Name:  "bulk",
				Value: 1000,
				Usage: "Number of documents to index per bulk request",
			},
		},
	},
}
View Source
var (

	// Mongodb Query to filter document that will be indexed to elasticsearch
	// It's json formatted query
	// Elaticsearch Mapping in JSON format
	// see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html for more information
	// Done channel signal, main goroutines should exit
	Done = make(chan struct{})
)

Functions

func IndexMongoToES

func IndexMongoToES(cliContext *cli.Context)

Main Commands Function

Types

This section is empty.

Jump to

Keyboard shortcuts

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