1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-11 22:24:21 +01:00
fab-manager/vendor/assets/components/elasticsearch
2016-03-23 18:39:41 +01:00
..
.bower.json release 2.0 rc 2016-03-23 18:39:41 +01:00
bower.json release 2.0 rc 2016-03-23 18:39:41 +01:00
elasticsearch.angular.js release 2.0 rc 2016-03-23 18:39:41 +01:00
elasticsearch.angular.min.js release 2.0 rc 2016-03-23 18:39:41 +01:00
elasticsearch.jquery.js release 2.0 rc 2016-03-23 18:39:41 +01:00
elasticsearch.jquery.min.js release 2.0 rc 2016-03-23 18:39:41 +01:00
elasticsearch.js release 2.0 rc 2016-03-23 18:39:41 +01:00
elasticsearch.min.js release 2.0 rc 2016-03-23 18:39:41 +01:00
package.json release 2.0 rc 2016-03-23 18:39:41 +01:00
README.md release 2.0 rc 2016-03-23 18:39:41 +01:00

elasticsearch

Elasticsearch client builds for bower.

Install

Install with bower

bower install elasticsearch

Add a <script> to your html file and off you go!:

<script src="/bower_components/elasticsearch/elasticsearch.js"></script>
<script>
  var client = elasticsearch.Client({
    host: 'localhost:9200'
  });
</script>

If you are using Angular

Use elasticsearch.angular.js instead. This will create an elasticsearch module with an esFactory that you can use.

/*
 * create your app module, specify "elasticsearch" as a dependency
 */
var app = angular.module('myApp', ['elasticsearch']);

/*
 * create a service, which provides your elasticsearch client
 * to other parts of your application
 */
app.service('es', function (esFactory) {
  return esFactory({
    host: 'localhost:9200',
    // ...
  });
});

If you are using jQuery

Use elasticsearch.jquery.js instead. Rather than a global elasticsearch it will create a jQuery.es namespace.

var client = new $.es.Client({
  hosts: 'localhost:9200'
});

Submit Issues, Pull Requests, etc to elasticsearch-js.