After digging further into TLL, I do indeed seem to find that mortals
(documents with a finite time to live) and immortals (documents with an
infinite time to live) cannot coexist within the same document type, but
they can coexist within different document types within the same index.
The following seems to work. But I'm not quite sure why. I set the overall
refresh interval to 5 seconds to make testing easier. So based on the
documentation I found, here are the beginnings of my settings and mappings
when I create the index:
{
- "settings" : {*
- "indices" : {*
-
"ttl.interval" : "5s"*
- }*,
"index" : {
"number_of_shards" : 1,
"refresh_interval" : "1s",
"analysis" : {
"char_filter" : { },
"filter" : {
"english_snowball_filter" : {
"type" : "snowball",
"language" : "English"
}
},
"analyzer" : {
"english_stemming_analyzer" : {
"type" : "custom",
"tokenizer" : "standard",
"filter" : [ "standard", "lowercase", "asciifolding",
"english_snowball_filter" ]
},
"english_standard_analyzer" : {
"type" : "custom",
"tokenizer" : "standard",
"filter" : [ "standard", "lowercase", "asciifolding" ]
}
}
}
}
}, .....
And here is what ElasticSearch sees as the index settings. Is index.indices
OK? It seems to work fine... no errors, and I certainly seem to notice the
5 second granularity on checking and watching documents disappear.
But I don't see any documentation that gives the context for this setting:
$ curl -XGET "localhost:9200/mortal/_settings?pretty=true"
{
"mortal" : {
"settings" : {
"index.analysis.filter.english_snowball_filter.type" : "snowball",
"index.indices.ttl.interval" : "5s",
"index.refresh_interval" : "1s",
"index.analysis.analyzer.english_standard_analyzer.type" : "custom",
"index.analysis.analyzer.english_stemming_analyzer.type" : "custom",
"index.analysis.analyzer.english_standard_analyzer.filter.0" :
"standard",
"index.number_of_shards" : "1",
"index.analysis.analyzer.english_standard_analyzer.filter.2" :
"asciifolding",
"index.analysis.analyzer.english_standard_analyzer.filter.1" :
"lowercase",
"index.analysis.filter.english_snowball_filter.language" : "English",
"index.analysis.analyzer.english_stemming_analyzer.filter.2" :
"asciifolding",
"index.analysis.analyzer.english_stemming_analyzer.filter.3" :
"english_snowball_filter",
"index.analysis.analyzer.english_standard_analyzer.tokenizer" :
"standard",
"index.analysis.analyzer.english_stemming_analyzer.tokenizer" :
"standard",
"index.analysis.analyzer.english_stemming_analyzer.filter.0" :
"standard",
"index.analysis.analyzer.english_stemming_analyzer.filter.1" :
"lowercase",
"index.number_of_replicas" : "1",
"index.version.created" : "200499"
}
}
}
Perhaps ES is just being very lenient to me?
Thanks in advance before I commit this all to code!
--
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.