npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

elasticsearch-memcache

v0.0.2

Published

A node.js driver for elasticsearch over the memcache protocol

Readme

elasticsearch-memcache

nodejs elasticsearch client over memcache

Install

To install the most recent release from npm, run:

npm install elasticsearch-memcache

To install the latest from the repository, run:

npm install path/to/elasticsearch-memcache

You need also the memcached plugin installed at your elasticsearch instance, take a look here elasticsearch memcached plugin installable over github elasticsearch-transport-memcached

Introduction

This is a node.js driver for MongoDB. It's a port (or close to a port) of the library for ruby at http://github.com/mongodb/mongo-ruby-driver/.

A simple example of inserting a document.

		var es = require("elasticsearch-memcache");
		
    var client = new es({
			"host": "127.0.0.1",
			"port": 11211
		}, function(){
			
			client.set("/test/test/1", {
				"Lorizzle fo shizzle": "dolizzle sit amizzle",
				"consectetuer adipiscing": "elit.",
				"Nullam fo velit": "my shizz pizzle, suscipit quis, gravida vel, arcu.",
				"Pellentesque gangsta tortizzle.": "Sed eros. Fusce izzle dolor dapibus turpis tempizzle pimpin'."
			}, function(error, success){
				
				client.up("/test/test/1", {
					"Maurizzle ass away izzle turpis.": "Mofo izzle tortizzle.",
					"Pellentesque eleifend rhoncizzle boom shackalack.": "In bow wow wow shiznit platea dictumst."
				}, function(){
					
					client.get("/test/test/1", function(error, doc){
						console.log(doc);
						client.quit();
					})
				})
			})
		});
		
		client.on('error', function() {
		  console.log('client error', arguments);
		});

		client.on('end', function() {
		  console.log('client disconnected');
		});

API

		.get( key, ?GET_PARAMETER, callback ) -> GET Request, get an document, indice, setting or something else over the API.
			
			es.get("/test/test/1", function(error, doc){ console.log(doc); })
			es.get("/test/test/1", { fields: "fieldkey1,fieldkey2" }, function(error, doc){ console.log(doc); })
			es.get("/_stats", function(error, stats){ console.log(stats); })
			
		.mget( docs, callback ) -> GET Request, collect multiple documents over one request
			es.mget({
				"docs": [
					{ "_index": "test", "_type": "test", "_id": 1 },
					{ "_index": "test", "_type": "test", "_id": 2 },
				]
			}, function(error, docs){})
		
		.set( key, value, ?GET_PARAMETER, callback ) -> POST Request, can be an document, the indice settings or whatever over the API.
			es.set("/test/test/1", { "fieldkey1": "fieldvalue1", "fieldkey2": "fieldvalue2" }, function(error, success){})
		
		.up( key, value, ?GET_PARAMETER, callback ) -> Update an document
			es.set("/test/test/1", { "fieldkey3": "fieldvalue3" }, function(error, success){})
		
		.del( key, ?GET_PARAMETER, callback ) -> send DELETE Request, can delete and document indice or something else over the API
			es.del("/test/test/1", function(error, success){})
			
		.quit(callback) -> quit connection
			es.quit(function(){})

GitHub information

The source code is available at https://github.com/grischaandreew/node-elasticsearch-memcache You can either clone the repository or download a tarball of the latest release.

Examples

For examples look in the example.js file. You can execute the examples using node.

$ node example.js