0.0.3 • Published 11 years ago
es-mapping-validator v0.0.3
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-validatorUsage
Run shell command es-mapping-validator <args>
-h,--host: ElasticSearch host, for examplelocalhost:9200-i,--index: Index name, for exampletweets-t,--type: Document type, for exampletweet-d,--id: Document id, for example1-a,--authHttp basic authentification (if need), for example 'username:password'-m,--mismatchesFlag Print only type mismatches.-f,--fullpathFlag Print full field's names.-r,--treeFlag Print results as a tree.
Example
es-mapping-validator -h localhost:9200 -a user:password -i tweets -t tweet -d 1 -m