theablefew / stretchy

Elasticsearch Models for Rails with an ActiveRecord-like behavior
https://theablefew.github.io/stretchy/#/
MIT License
2 stars 0 forks source link

Fix attribute types and add mapping options #74

Closed esmarkowski closed 3 months ago

esmarkowski commented 3 months ago

This pull request fixes the issues #73 and #71 by adding new attribute types and mapping options to the codebase. The changes include adding sparse_vector and dense_vector attribute types, as well as updating the byte, long, float, short, double, string, half_float, integer, and unsigned_long attribute types. Additionally, a new histogram attribute type and a match_only_text attribute type have been added. This PR also includes some minor code refactoring and bug fixes.

It includes all attribute types supported by Elasticsearch 8

In addition, options can be passed to the attribute methods that correspond to the parameters for the type in elasticsearch.

Added ModelName.attribute_mappings will output the configured mapping based on those parameters.