Skip to content
/ schema Public
forked from pelias/schema

elasticsearch schema files and tooling

Notifications You must be signed in to change notification settings

sheerun/schema

 
 

Repository files navigation

Installation

$ npm install pelias-schema

NPM

Usage

You can pull down a versioned copy of the pelias schema from npm:

var schema = require('pelias-schema');

console.log( JSON.stringify( schema, null, 2 ) );

Scripts

create index

node scripts/create_index.js;               # quick start

drop index

node scripts/drop_index.js;                 # drop everything
node scripts/drop_index.js --force-yes;     # skip warning prompt

reset a single type

This is useful when you want to reset a single type without wiping the rest of your index.

node scripts/reset_type.js mytype;          # reset a single type

update settings on an existing index

This is useful when you want to add a new analyser or filter to an existing index.

note: it is impossible to change the number_of_shards for an existing index, this will require a full re-index.

node scripts/update_settings.js;          # update index settings

output schema file

Use this script to pretty-print the whole schema file or a single mapping to stdout.

node scripts/output_mapping.js mytype;          # single type mapping
node scripts/output_mapping.js;                 # whole schema file

NPM Module

The pelias-schema npm module can be found here:

https://npmjs.org/package/pelias-schema

Contributing

Please fork and pull request against upstream master on a feature branch.

Pretty please; provide unit tests and script fixtures in the test directory.

Running Unit Tests

$ npm test

Running Integration Tests

Requires a running elasticsearch server (no other setup required)

$ npm run integration

Continuous Integration

Travis tests every release against Node.js version 0.12, 4, 5, and 6.

Build Status

About

elasticsearch schema files and tooling

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%