- Add connect option 'syncMapping' to enabled/disable automatic shcema->elasticsearch put mappings. syncMapping is true by default.
- Changed default Number type in schema to be elasticsearch long instead of integer to match elasticsearch defaults for dynamic mapping (JSON integers are long by default)
- Fixed an issue relating to constant_score queries.
- Temp workaround for float/double validator not accepting numbers without decimals.
- Fixed an edge case for connection issues.
- Add schema static and instance methods.
- Lazy update elasticsearch mappings (generated from schemas) on initialization. set ignore_conflicts=true to avoid breaking changes. note: you can not change the type after it is already mapped, this means no changing the type of a property in your schema definitions.
- Remove store property from default mappings.
- Fix missing PagedResponse when no results exist.
- Fix undefined document on update with schema validation.
- Fix not being able to match filters against arrays of values like
.find({tags: ['tag1', 'tag2']}
- Schema validation will now check the type of all elements in a native array.
- .connect() now returns nothing instead of status() in order to speed up connections.
- Schemas now return a ValidationError object instead of array of errors. this is the same as mongoose.
- Fix sort, page & per_page was not allowed for .findByIds() queries.
- Auto-escaper query String Queries 'q queryOption' according to elasticsearch standards.
- Fix toJSON for page reponse should return object.
- Ensure post hooks do not receive callbacks.
- Improve test coverage of model hooks.
- Update readme with more info on model hooks.
- Fix improper promise being returned from .find() calls, errors weren't being caught properly.
- Ensure .find() call resolved with an empty array when nothing is found.
- Ensure .findById() rejects with an error when the id is not found.
- Ensure .findByIds() resolves with an empty array when no ids are found.
- Fix .toJSON() not retuning an object.
- Fix issue with 'client' property in core not available/undefined.
- Fix move PagedResponse prototype out of function call.
- Remove error when q is used with match/must.
- Fix connection error not throwing properly on bad connection.
- Add schema pre/post hooks for model .save() and .remove().
- Update readme with info on schema hooks.