dump

command
v0.0.0-...-bcc76fe Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 8 Imported by: 0

README

Importing experts from MySQL to Elasticsearch

This command can be safely run many times because of the index deletion on every run

Dependency

The script requires a mapping file named mapping.json located in data/static/mapping.json

Usage example

go run dump.go -did=1,2 -countries=poland,germany

Parameters
  • -did [Optional] Comma separated list of the deployments (skip to include all of them)
  • -countries [Optional] Comma separated list of the countries (skip to include all of them)

Other
Manually delete the local index

curl -X DELETE "localhost:9202/experts"

Searching example:
curl -XGET "http://localhost:9202/experts/_search" -H 'Content-Type: application/json' -d'
{
  "query": {
    "match": {
      "country" : "GERMANY"
    }
  }
}' | json_pp

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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