Can anyone confirm my use of the _ttl feature?

My elasticsearch install is pretty simple, but I am having trouble
verifying the use of the _ttl parameter. It would seem from the
documentation it needs to be in the "mapping" part of the config file (
http://www.elasticsearch.org/guide/reference/mapping/ttl-field/) I have
created the follwing config:
{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
"_ttl": {
"enabled": true,
"default": "7d"
},
},
"mappings": {
"default": {
"_all": {
"enabled": false
}
}
}
}

I tried using the _ttl field in the mappings part, but that was disastrous
(elasticsearch basically refused to create logstash* indexes, not good at
00:00 :frowning: ).

Thanks in advance for any replies.

Robert Campbell

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

It seems my settings are not working :frowning:

Doing a GET from logstash*/_settings give me this for the index created a
00:00 tonight.

logstash-2013.05.08: {
settings: {
index.cache.field.expire: 5m
index.refresh_interval: 5s
index.cache.filter.expire: 5m
index.store.compress.tv: true
index.store.compress.stored: true
index.number_of_shards: 5
index.number_of_replicas: 1
index.version.created: 200699
}
}

On Wednesday, May 8, 2013 8:41:20 AM UTC+2, Robert Campbell wrote:

My elasticsearch install is pretty simple, but I am having trouble
verifying the use of the _ttl parameter. It would seem from the
documentation it needs to be in the "mapping" part of the config file (
Elasticsearch Platform — Find real-time answers at scale | Elastic) I have
created the follwing config:
{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
"_ttl": {
"enabled": true,
"default": "7d"
},
},
"mappings": {
"default": {
"_all": {
"enabled": false
}
}
}
}

I tried using the _ttl field in the mappings part, but that was disastrous
(elasticsearch basically refused to create logstash* indexes, not good at
00:00 :frowning: ).

Thanks in advance for any replies.

Robert Campbell

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Le 8 mai 2013 08:41, "Robert Campbell" camprr@gmail.com a écrit :

My elasticsearch install is pretty simple, but I am having trouble
verifying the use of the _ttl parameter. It would seem from the
documentation it needs to be in the "mapping" part of the config file (
Elasticsearch Platform — Find real-time answers at scale | Elastic) I have
created the follwing config:
{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
"_ttl": {
"enabled": true,
"default": "7d"
},
},
"mappings": {
"default": {
"_all": {
"enabled": false
}
}
}
}

I tried using the _ttl field in the mappings part, but that was
disastrous (elasticsearch basically refused to create logstash* indexes,
not good at 00:00 :frowning: ).

Hi,

The _ttl field must be set in the mapping section. Please paste your
updated configuration and the error returned by ES when you try to create a
new index.

Sent from my phone

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

This:

{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
},
"mappings": {
"_ttl": {
"enabled": true,
"default": "7d"
},
"default": {
"_all": {
"enabled": false
}
}
}
}

Results in (in the logfile):

[2013-05-08 11:15:51,696][WARN ][cluster.metadata ] [Space Turnip]
[logstash-2013.05.08] failed to create
org.elasticsearch.index.mapper.MapperParsingException: mapping [_ttl]
at
org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:285)
at
org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:223)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.elasticsearch.indices.InvalidTypeNameException: mapping type
name [ttl] can't start with ''
at
org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:201)
at
org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:189)
at
org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:282)
... 4 more

On Wed, May 8, 2013 at 9:46 AM, Kevin Decherf kevin@kdecherf.com wrote:

Le 8 mai 2013 08:41, "Robert Campbell" camprr@gmail.com a écrit :

My elasticsearch install is pretty simple, but I am having trouble
verifying the use of the _ttl parameter. It would seem from the
documentation it needs to be in the "mapping" part of the config file (
Elasticsearch Platform — Find real-time answers at scale | Elastic) I have
created the follwing config:
{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
"_ttl": {
"enabled": true,
"default": "7d"
},
},
"mappings": {
"default": {
"_all": {
"enabled": false
}
}
}
}

I tried using the _ttl field in the mappings part, but that was
disastrous (elasticsearch basically refused to create logstash* indexes,
not good at 00:00 :frowning: ).

Hi,

The _ttl field must be set in the mapping section. Please paste your
updated configuration and the error returned by ES when you try to create a
new index.

Sent from my phone

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/rxhZhrsNaTg/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Le 8 mai 2013 11:27, "Robert Campbell" camprr@gmail.com a écrit :

This:

{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
},
"mappings": {
"_ttl": {
"enabled": true,
"default": "7d"
},
"default": {
"_all": {
"enabled": false
}
}
}
}

I don't know how templating exactly works but you should move "_ttl" into
"default" object

Sent from my phone

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ok, will try, thanks for the hint!

On Wed, May 8, 2013 at 12:02 PM, Kevin Decherf kevin@kdecherf.com wrote:

Le 8 mai 2013 11:27, "Robert Campbell" camprr@gmail.com a écrit :

This:

{
"template": "logstash*",
"settings": {
"index.cache.filter.expire": "5m",
"index.cache.field.expire": "5m",
"index.refresh_interval": "5s",
"index.store.compress.tv": true,
"index.store.compress.stored": true
},
"mappings": {
"_ttl": {
"enabled": true,
"default": "7d"
},
"default": {
"_all": {
"enabled": false
}
}
}
}

I don't know how templating exactly works but you should move "_ttl" into
"default" object

Sent from my phone

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/rxhZhrsNaTg/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.