Elasticsearch Memcached transport plugin

The memcached transport plugin allows to use the REST interface over memcached.

License

License

Categories

Categories

Search Business Logic Libraries Elasticsearch
GroupId

GroupId

org.elasticsearch
ArtifactId

ArtifactId

elasticsearch-transport-memcached
Last Version

Last Version

2.7.0
Release Date

Release Date

Type

Type

jar
Description

Description

Elasticsearch Memcached transport plugin
The memcached transport plugin allows to use the REST interface over memcached.
Project URL

Project URL

https://github.com/elastic/elasticsearch-transport-memcached/
Source Code Management

Source Code Management

http://github.com/elastic/elasticsearch-transport-memcached

Download elasticsearch-transport-memcached

How to add to project

<!-- https://jarcasting.com/artifacts/org.elasticsearch/elasticsearch-transport-memcached/ -->
<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch-transport-memcached</artifactId>
    <version>2.7.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.elasticsearch/elasticsearch-transport-memcached/
implementation 'org.elasticsearch:elasticsearch-transport-memcached:2.7.0'
// https://jarcasting.com/artifacts/org.elasticsearch/elasticsearch-transport-memcached/
implementation ("org.elasticsearch:elasticsearch-transport-memcached:2.7.0")
'org.elasticsearch:elasticsearch-transport-memcached:jar:2.7.0'
<dependency org="org.elasticsearch" name="elasticsearch-transport-memcached" rev="2.7.0">
  <artifact name="elasticsearch-transport-memcached" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.elasticsearch', module='elasticsearch-transport-memcached', version='2.7.0')
)
libraryDependencies += "org.elasticsearch" % "elasticsearch-transport-memcached" % "2.7.0"
[org.elasticsearch/elasticsearch-transport-memcached "2.7.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.elasticsearch : elasticsearch jar 1.7.0
log4j : log4j jar 1.2.17

test (5)

Group / Artifact Type Version
org.hamcrest : hamcrest-all jar 1.3
com.carrotsearch.randomizedtesting : randomizedtesting-runner jar 2.1.14
org.apache.lucene : lucene-test-framework jar 4.10.4
net.spy : spymemcached jar 2.11.5
org.elasticsearch : elasticsearch test-jar 1.7.0

Project Modules

There are no modules declared in this project.

Memcached Transport for Elasticsearch

DEPRECATED: The memcached transport is deprecated as of Elasticsearch v1.5.0, and will be removed in 2.0

The memcached transport plugin allows to use the REST interface over memcached (though with limitations). The memcached protocol supports both the binary and the text protocol, automatically detecting the correct one to use.

In order to install the plugin, simply run:

bin/plugin install elasticsearch/elasticsearch-transport-memcached/2.7.0

You need to install a version matching your Elasticsearch version:

elasticsearch memcached Plugin Docs
master Build from source See below
es-1.7 2.7.0 2.7.0
es-1.6 2.6.0 2.6.0
es-1.5 2.5.0 2.5.0
es-1.4 2.4.1 2.4.1
es-1.3 2.3.0 2.3.0
es-1.2 2.2.0 2.2.0
es-1.0 2.0.0 2.0.0
es-0.90 1.7.0 1.7.0

To build a SNAPSHOT version, you need to build it with Maven:

mvn clean install
plugin --install transport-memcached \
       --url file:target/releases/elasticsearch-transport-memcached-X.X.X-SNAPSHOT.zip

mapping rest to memcached protocol

Memcached commands are mapped to REST and handled by the same generic REST layer in elasticsearch. Here is a list of the memcached commands supported:

get

The memcached GET command maps to a REST GET. The key used is the URI (with parameters). The main downside is the fact that the memcached GET does not allow body in the request (and SET does not allow to return a result...). For this reason, most REST APIs (like search) allow to accept the "source" as a URI parameter as well.

set

The memcached SET command maps to a REST POST. The key used is the URI (with parameters), and the body maps to the REST body.

delete

The memcached DELETE command maps to a REST DELETE. The key used is the URI (with parameters).

quit

The memcached QUIT command is supported and disconnects the client.

settings

The following are the settings the can be configured for memcached:

Setting Description
memcached.port A bind port range. Defaults to 11211-11311.

It also uses the common network settings.

disable memcached

The memcached module can be completely disabled and not started using by setting memcached.enabled to false. By default it is enabled once it is detected as a plugin.

Known limitations

Memcached protocol only allow the key length to be under 250. It means that when you send a "big" query using GET, the JSON document passed as a URI parameter it could ends up to be truncated. So elasticsearch don't get the whole query and generate a JsonParseException error. It's better to use SET in that case.

License

This software is licensed under the Apache 2 license, quoted below.

Copyright 2009-2014 Elasticsearch <http://www.elasticsearch.org>

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
org.elasticsearch

elastic

Versions

Version
2.7.0
2.6.0
2.5.0
2.4.1
2.4.0
2.3.0
2.2.0
2.0.0
2.0.0.RC1
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
0.18.7
0.18.6
0.18.5
0.18.4
0.18.3
0.18.2
0.18.1
0.18.0
0.17.10
0.17.9
0.17.8
0.17.7
0.17.6
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.5
0.16.4
0.16.3
0.16.2
0.16.1
0.16.0
0.15.2
0.15.1
0.15.0
0.14.4
0.14.3
0.14.2
0.14.1
0.14.0
0.13.1
0.13.0
0.12.1
0.12.0
0.11.0
0.10.0
0.9.0
0.8.0
0.7.1
0.7.0