Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elasticsearch-mappings

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch-mappings

Easy to use elasticsearch schema/mappings uploader writen in nodejs.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

ElasticSearch - Mappings

A simple elasticsearch helper CLI tool, written in nodejs. Use to upload index mappings to database in a simple way.

How to Use

  1. Add mapping settings to one folder.
  2. File names must match index names and have json format.
  3. Everything else happens automatically.
elasticsearch-mappings create [path] [-h] [-f]
elasticsearch-mappings delete [index]

Options:

Create:

  • [path]: optional path to a mappings file or directory (current directory will be used by default).
  • [-h, --host]: optional elasticsearch host parameter (default: localhost:9200)
  • [-f, --force]: force recreation of indices.

Delete:

  • [index]: optional index name (all indices will be delete by default).

Files

A file named foo.json inside /mappings folder will result in the creation of an index named foo and will have settings described in a file.

NOTE: elasticsearch-mappings by default doesn't look for /mappings directory!

elasticsearch-mappings support all settings options defined in elasticsearch reference.

Reference: mappings

Example

Running elasticsearch-mappings create ./example will create two indices, bar and foo. Running elasticsearch-mappings create ./example/bar.json will create only one index, bar.

Running elasticsearch-mappings delete bar will delete only one index, bar. Running elasticsearch-mappings delete will delete all/both indexes, bar and foo.

Contribution

  • Fork the repo.
  • Change the code.
  • Create a PR.

If you find a bug, please open an issue or create a PR.

Keywords

FAQs

Package last updated on 27 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc