Permalink
Browse files

Updated README

  • Loading branch information...
Gabriel Farrell
Gabriel Farrell committed Mar 26, 2013
1 parent 60734a2 commit d7a908522718e1773d358873ec03bb4bed77cd81
Showing with 25 additions and 27 deletions.
  1. +25 −27 README.md
View
@@ -1,48 +1,46 @@
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
- lib.createClient(function(client) {
- client.query({query: {field: {field1: 'hai'}}}, function(err, results) {
- console.log(sys.inspect(results, true, 10));
- });
- });
+API
+===
+TBD
-API
-==============
-*Will go here when I'm ready to post it.*
+Testing
+=======
+
+```
+npm install
+npm test
+```
Requirements
-=============
+============
-* NodeJS
-* Elastic Search
-* nodeunit (for testing)
+* Node.js
+* elasticsearch
* The need for search
License
-=============
+=======
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

0 comments on commit d7a9085

Please sign in to comment.