# es-mapping-validator

> Validate Elastic Search document with its mapping.

Latest version **0.0.3** (published 2014-10-01) · 0 weekly downloads

## Install

```sh
npm install es-mapping-validator
pnpm add es-mapping-validator
yarn add es-mapping-validator
bun add es-mapping-validator
```

Provides the command `es-mapping-validator`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-10-01 |
| First published | 2014-10-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | atott |
| Maintainers | atott |
| Keywords | es, elasticsearch, validation, mapping |

## Links

- npm: https://www.npmjs.com/package/es-mapping-validator
- Repository: https://github.com/atott/es-mapping-validator
- Issues: https://github.com/atott/es-mapping-validator/issues
- npm.io page: https://npm.io/package/es-mapping-validator

## Dependencies (2)

- [optimist](https://npm.io/package/optimist.md) ~0.6.1
- [elasticsearch](https://npm.io/package/elasticsearch.md) =2.4.3

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2014-10-01
- 0.0.2 — 2014-10-01
- 0.0.1 — 2014-10-01
- 0.0.0 — 2014-10-01

## README

es-mapping-validator
====================

Validate Elastic Search document with its mapping.

If you get error like this
```
{
   "error": "RemoteTransportException[[BlaBla-Bla][inet[/10.74.184.8:2121]][update]]; nested: MapperParsingException[object mapping for [profile] tried to parse as object, but got EOF, has a concrete value been provided to it?]; ",
   "status": 400
}
```
you need to find the document property wich mismatch its mapping. Of course it will not be property `profile` that you can see in the error :). This tool will hellp you to find mismatching fields.


## Installation ##

```
npm install es-mapping-validator
```

## Usage ##

Run shell command `es-mapping-validator <args>`

* `-h`, `--host`: ElasticSearch host, for example `localhost:9200`
* `-i`, `--index`: Index name, for example `tweets`
* `-t`, `--type`: Document type, for example `tweet`
* `-d`, `--id`: Document id, for example `1`
* `-a`, `--auth` Http basic authentification (if need), for example 'username:password'
* `-m`, `--mismatches` **Flag** Print only type mismatches.
* `-f`, `--fullpath` **Flag** Print full field's names.
* `-r`, `--tree` **Flag** Print results as a tree.

Example

```
es-mapping-validator -h localhost:9200 -a user:password -i tweets -t tweet -d 1 -m
```

---
_Source: https://npm.io/package/es-mapping-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
