Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.19 KB

README.md

File metadata and controls

51 lines (35 loc) · 1.19 KB

neuroplastic

CI

A module for rethinkdb-orm.
Exposes an elasticsearch query DSL that automagically resolves relations between the models.

Installation

  1. Add the dependency to your shard.yml:
dependencies:
    neuroplastic:
    github: place-labs/neuroplastic
  1. 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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request.

Contributors