Add the following code to your project's shard.yml under:
to use in production
- OR -
development_dependencies to use in development
A small (one might even say 'micro') service that hooks into rethinkdb-orm models and generates elasticsearch indices.
search-ingest exposes a REST API to reindex/backfill specific models.
SearchIngest::MANAGED_TABLESwith an array of
(T < RethinkORM::Base).class
ES_PORTenv vars, or through switches on the command line
Deletes indexes and recreates index mappings. Backfills the indices by default (toggle with backfill boolean).
Backfills all indexes with data from RethinkDB.
es_typeto specify the correct field datatype for the index schema.
belongs_toassociations are modeled with ES
joindatatypes, associated documents are replicated in their parent's index. This is necessary for
SearchIngest::TableManager hooks into the changefeed of a table, resolves associations of the model and creates/updates documents in the appropriate ES indices.
ENV: A value of
productionlowers log verbosity
ES_HOST: Elasticsearch host
ES_PORT: Elasticsearch port
ES_TLS: Use Elasticsearch https, default is
ES_URI: Elasticsearch uri, detects whether to use TLS off schema
ES_DISABLE_BULK: Use single requests to Elasticsearch instead of the bulk API. Defaults to
ES_CONN_POOL_TIMEOUT: Timeout when checking a connection out of the Elasticsearch connection pool
ES_CONN_POOL: Size of the Elasticsearch connection pool
ES_IDLE_POOL: Maximum number of idle connections in the Elasticsearch connection pool
UDP_LOG_HOST: Host for sending JSON formatted logs to
UDP_LOG_PORT: Port that UDP input service is listening on
RETHINKDB_DB: DB to mirror to Elasticsearch, defaults to
RETHINKDB_HOST: Host of RethinkDB, defaults to
RETHINKDB_PORT: Port of RethinkDB, defaults to
PLACE_SEARCH_INGEST_HOST: Host to bind server to
PLACE_SEARCH_INGEST_PORT: Port for server to listen on
$ ./test(run tests and tear down the test environment on exit)
$ ./test --watch(run test suite on change)