Elasticsearch schema definitions and tooling for the Pelias geocoder. As of v9.1.0, this package provides the Elasticsearch index mappings, settings, and scripts to create, drop, and update indices required by Pelias. It is updated alongside Pelias releases to support latest Elasticsearch versions (compatible with ES 7.x). Key differentiators: ships with pre-tuned analyzers and filters optimized for geocoding (e.g., custom synonym files), and integrates with pelias-config for dynamic index name. Release cadence is tied to Pelias core releases, approximately quarterly.
npm install pelias-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require and use the main functions: createIndex with an Elasticsearch client, dropIndex, and access the schema object.
Upgrade your Elasticsearch cluster to version 7.x before updating pelias-schema to v7+.
Instead of calling the exported updateSettings, run node scripts/update_settings.js from the package root.
Ensure the index name is correctly set in pelias.json before creating the index. If you need to rename, create a new index and reimport data.
Always pass --force-yes flag when running in scripts or CI: node scripts/drop_index.js --force-yes
Set desired number_of_shards in pelias.json via schema.settings.index.number_of_shards before creating the index.
Run: npm install pelias-config
Ensure you create a valid Elasticsearch client: require('elasticsearch').Client({ host: 'localhost:9200' })Start Elasticsearch on localhost:9200 or update host in client configuration.
Increase client requestTimeout (e.g., new Client({ requestTimeout: 120000 })) or check Elasticsearch health.