Giter Club home page Giter Club logo

node.es's Introduction

Node gadgets for Elastic Search

Proxy server

Basically, the proxy server can do the following for you:

  • It can restrict access to Elastic Search REST API (defaults to safe operations only).
  • You can provide handlers to modify HTTP client request (e.g. you can ensure that size is not too big) and Elastic Search response (e.g. you can remove sensitive data).
  • It can round-robin client requests among active HTTP enabled nodes (it periodically refreshes list of active nodes), thus, it can provide a single URL for clients to communicate with Elastic Search cluster.

You can find simple example in proxy-example.js
More detailed documenation can be found in source code of elasticsearch-proxy.js

node.es's People

Contributors

lukas-vlcek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node.es's Issues

Proxy example does not work

Using ES 0.16.2 and Node 0.4.8 and recent BigDesk
$ node proxy-example.js

The issue I am facing it that the responseData of the postRequest is not valid JSON, but wrapped in jsonp.
https://github.com/lukas-vlcek/node.es/blob/master/proxy/proxy-example.js#L52
var json = JSON.parse(responseData);

I am able to remove the jsonp characters, but BigDesk does not update with no error messages.
var json = JSON.parse(responseData.replace(/^jsonp[0-9]*(/,"").replace(/);$/, ""));

Node.js 0.6 complains: The "sys" module is now called "util". It should have a similar interface.

On Ubuntu 11.10 with Node.js version 0.6 running the example gives:

$ node proxy.js
The "sys" module is now called "util". It should have a similar interface.

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected token /
at Object.parse (native)
at /home/otto/Kirjastot.fi/librarydirectory/server/lib/elasticsearch-proxy.js:179:31
at /home/otto/Kirjastot.fi/librarydirectory/server/lib/elasticsearch-proxy.js:278:9
at new (/home/otto/Kirjastot.fi/librarydirectory/server/lib/elasticsearch-proxy.js:310:5)
at Object.getProxy (/home/otto/Kirjastot.fi/librarydirectory/server/lib/elasticsearch-proxy.js:475:21)
at Object. (/home/otto/Kirjastot.fi/librarydirectory/server/proxy.js:54:32)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)

Apparently node.es is not compatible with Node 0.6 as the sys API has changed..?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.