-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from gsf/readme-update
Readme update
- Loading branch information
Showing
2 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,48 +1,46 @@ | |||
node-elasticsearch | node-elasticsearch | ||
============ | ================== | ||
|
|
||
This is a module around the REST API for [Elastic Search](http://www.elasticsearch.org/) built for NodeJS. | This is a Node.js module for the [elasticsearch](http://www.elasticsearch.org/) REST API. | ||
|
|
||
|
|
||
Details | Usage | ||
============= | ===== | ||
|
|
||
This works with node 0.4.x and with 0.2.x. I needed it for both and so wrote an [http compatability layer](http://github.com/ncb000gt/node-http_compat). | ```js | ||
var elasticsearch = require('elasticsearch'); | |||
var es = elasticsearch({index: 'kitteh'}); | |||
|
|
||
es.query({query: {field: {field1: 'hai'}}}, function(err, results) { | |||
console.log(results); | |||
}); | |||
``` | |||
|
|
||
Usage | |||
============= | |||
|
|
||
var lib = require('elasticsearch'), sys = require('sys'); //replace sys with util if you're on node 0.4.x | API | ||
lib.createClient(function(client) { | === | ||
client.query({query: {field: {field1: 'hai'}}}, function(err, results) { | |||
console.log(sys.inspect(results, true, 10)); | |||
}); | |||
}); | |||
|
|
||
TBD | |||
|
|
||
API | |||
============== | |||
|
|
||
*Will go here when I'm ready to post it.* | Testing | ||
======= | |||
|
|||
``` | |||
npm install | |||
npm test | |||
``` | |||
|
|
||
|
|
||
Requirements | Requirements | ||
============= | ============ | ||
|
|
||
* NodeJS | * Node.js | ||
* Elastic Search | * elasticsearch | ||
* nodeunit (for testing) | |||
* The need for search | * The need for search | ||
|
|
||
|
|
||
License | License | ||
============= | ======= | ||
|
|
||
MIT | MIT | ||
|
|||
|
|||
Trademarks? | |||
============ | |||
|
|||
Node.js™ is an official trademark of Joyent. This module is not formally related to or endorsed by the official Joyent Node.js open source or commercial project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters