Pure in-memory option for running elasticsearch?

I've tried the following, which still results in the creation of two
files (data/elasticsearch/nodes/0/_state/metadata-3 and shards-3), as
well as an empty directory for each index.

Settings settings = ImmutableSettings.settingsBuilder()
.put("node.http.enabled", false)
.put("index.gateway.type", "none")
.put("index.store.type", "memory")
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0).build();
node =
NodeBuilder.nodeBuilder().local(true).settings(settings).node();
client = node.client();
...

Is there an option to use elasticsearch without touching the file
system at all? This would simplify certain unit tests...

If you use maven, you can specify your path to be in target/es/data for
example.
So mvn clean will clean your test files.
But if there is any option for it, I will be pleased to see it also... :wink:

David.

Le 3 février 2012 à 20:47, Eric Jain eric.jain@gmail.com a écrit :

I've tried the following, which still results in the creation of two
files (data/elasticsearch/nodes/0/_state/metadata-3 and shards-3), as
well as an empty directory for each index.

Settings settings = ImmutableSettings.settingsBuilder()
.put("node.http.enabled", false)
.put("index.gateway.type", "none")
.put("index.store.type", "memory")
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0).build();
node =
NodeBuilder.nodeBuilder().local(true).settings(settings).node();
client = node.client();
...

Is there an option to use elasticsearch without touching the file
system at all? This would simplify certain unit tests...

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

You need to set the gateway.type to none, which will automatically set the index gateway to none. But, there will still be a need for file system since the transaction log only implementation is file system based (there is no in memory transaction log).

On Friday, February 3, 2012 at 9:47 PM, Eric Jain wrote:

I've tried the following, which still results in the creation of two
files (data/elasticsearch/nodes/0/_state/metadata-3 and shards-3), as
well as an empty directory for each index.

Settings settings = ImmutableSettings.settingsBuilder()
.put("node.http.enabled", false)
.put("index.gateway.type", "none")
.put("index.store.type", "memory")
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0).build();
node =
NodeBuilder.nodeBuilder().local(true).settings(settings).node();
client = node.client();
...

Is there an option to use elasticsearch without touching the file
system at all? This would simplify certain unit tests...