Installation

# Add this to your shard.yml
dependencies:
  neuroplastic:
    github: place-labs/neuroplastic
    version: ~> 1.15.0

Then run:

shards install

shard.yml

Crystal
>= 1.0.0
License
MIT
Author
Caspian Baska

Dependencies

Runtime Dependencies

  • db~> 0.9github: crystal-lang/crystal-db

Development Dependencies

  • ameba*github: crystal-ameba/amebadev
  • pg-orm*github: spider-gazelle/pg-ormdev
  • search-ingest~> 2.0github: placeos/search-ingestdev

README

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