Skip to content

commandline tools to index mongodb documents in elasticsearch

License

Notifications You must be signed in to change notification settings

AdhityaRamadhanus/mongoes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MONGOES

Go Report Card

commandline tools to index mongodb documents in elasticsearch

Installation | Mongoes | Usage | License

This tool is perfect fit for you if you only need to index some collection to elasticsearch without having to setup replicaset, or if you want to have control over the mapping like what fields to be indexed what type in elasticsearch this field should be indexed

Installation

  • git clone
  • go get
  • make

Mongoes

  • Mongoes will index your mongodb collection to elasticsearch based on a mapping you provide

Usage

mongoes --help

NAME:
   mongoes - Index Mongodb Collection to ES

USAGE:
   mongoes [global options] command [command options] [arguments...]

VERSION:
   1.0.0

AUTHOR:
   Adhitya Ramadhanus <adhitya.ramadhanus@gmail.com>

COMMANDS:
     index    Index collection to elasticsearch
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
  • config, Your configuration file (in json)
  • Config Example
{
    "mongodb": {
        "uri": "localhost:27017",
        "database": "somedb",
        "collection": "somecoll"
    },
    "elasticsearch": {
        "uri": "http://localhost:9200",
        "index": "someindex",
        "type": "sometype"
    },
    "query": {
        "completed": true
    },
	  "mapping": {	
		  "title": { // take title field in mongodb collection
			"es_type": "string", // will be mapped to string
			"es_index": "not_analyzed"
		},
		"completed": {
			"es_name": "done", // will be mapped to field called done in elasticsearch
			"es_type": "boolean"
		}
	}
}

License

MIT © [Adhitya Ramadhanus]

About

commandline tools to index mongodb documents in elasticsearch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published