A Polymer Element which creates and returns a client connection to an Elasticsearch server via the standard elasticsearch javascript API. Once a connection is established, the client property can be used by other elements in your application to access the elastic REST API.
<elastic-client
config='{"host": "http://localhost:9200"}'
client="{{esclient}}">
</elastic-client>
<elastic-client-search
client="[[esclient]]"
index="myindex"
type="[[indexType]]"
body='{"query": {"match_all": {}}}'
results="{{results}}"
last-error="{{error}}">
</elastic-client-search>
Dependencies are installed using Bower:
npm install -g bower
bower install
Tests require a local instance of elasticsearch.
Tests are run using web-component-tester:
npm install -g web-component-tester
wct
Demonstration and documentation are viewed using polyserve:
npm install -g polyserve
polyserve