neuroplastic
A module for rethinkdb-orm.
Exposes an elasticsearch query DSL that automagically resolves relations between the models.
Installation
- Add the dependency to your
shard.yml
:
dependencies:
neuroplastic:
github: place-labs/neuroplastic
- Run
shards install
Usage
require "neuroplastic"
class Model < RethinkORM::Base
include Neuroplastic
attribute name : String
attribute age : Int32
end
# Construct a query
query = Model.elastic.query.filter({"name": "bill"})
# Dump the query object
puts query.build
# Perform search
Model.elastic.search(query)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request.
Contributors
- Caspian Baska - creator and maintainer