added elasticsearch module to the repo

This commit is contained in:
Spencer Alger 2014-06-20 12:34:35 -07:00
parent 5db9fa3fc6
commit 721e8ba45b
11 changed files with 109316 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,6 +1,5 @@
.DS_Store
node_modules
trash
src/bower_components/elasticsearch
build
target

View file

@ -0,0 +1,25 @@
{
"name": "elasticsearch",
"version": "2.2.0",
"authors": [
"Spencer Alger <spencer@spenceralger.com>"
],
"description": "The official low-level Elasticsearch client, for use in the browser.",
"main": "elasticsearch.js",
"keywords": [
"elasticsearch",
"client"
],
"license": "Apache 2.0",
"homepage": "https://github.com/elasticsearch/bower-elasticsearch-js",
"_release": "2.2.0",
"_resolution": {
"type": "version",
"tag": "v2.2.0",
"commit": "cd1bfc6dc6f9474583d039815471f607947a5be0"
},
"_source": "git://github.com/elasticsearch/bower-elasticsearch-js.git",
"_target": "~2.2.0",
"_originalSource": "elasticsearch",
"_direct": true
}

View file

@ -0,0 +1,50 @@
# 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](https://github.com/elasticsearch/elasticsearch-js).

View file

@ -0,0 +1,14 @@
{
"name": "elasticsearch",
"version": "2.2.0",
"authors": [
"Spencer Alger <spencer@spenceralger.com>"
],
"description": "The official low-level Elasticsearch client, for use in the browser.",
"main": "elasticsearch.js",
"keywords": [
"elasticsearch",
"client"
],
"license": "Apache 2.0"
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,19 @@
{
"name": "elasticsearch-browser",
"version": "2.2.0",
"description": "The official low-level Elasticsearch client, for use in the browser.",
"main": "elasticsearch.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git://github.com/elasticsearch/bower-elasticsearch-js.git"
},
"author": "Spencer Alger <spencer@spenceralger.com>",
"license": "Apache 2.0",
"bugs": {
"url": "https://github.com/elasticsearch/bower-elasticsearch-js/issues"
},
"homepage": "https://github.com/elasticsearch/bower-elasticsearch-js"
}