#SEARCHCLIENT.RUBY This is intended as an extremely simple starting point for creating middleware for Elasticsearch, a place to manage queries and results. It uses the Elasticsearch Ruby client and Grape, "An opinionated micro-framework for creating REST-like APIs in Ruby"
The current implementation allows you to pass a query into Elasticsearch using the "query" parameter, it will do a match query on the _all field, and write out the unmodified JSON response.
The server runs on localhost:9292 as default.
Sample request:
http://localhost:9292/search?query=ipa
##Requirements tested in ruby version 1.9.3 and version 2.0
To install the necessary packages:
sudo bundle install
on windows you may need to install ruby dev tools
#RUNNING THE SERVER type in the following command
rackup
##CONFIGURATION .env file contains settings for elasticsearch server and index
ES_SERVER=http://localhost:9200
ES_INDEX=
To search in your preferred index, set the ES_INDEX option