I have lots of documents being indexed into an ES cluster, and I do not expect we are making use of TTLs in any index/mapping, nor do i expect we have any process that should ever delete documents... but the total number of documents, as reported by kopf plugin, is decreasing on regular basis...
How can I track down why is it this happening? Is there some query logging maybe to enable? or could this number be decreasing for reasons other than "someone sent a delete document" request?
Does the issue replicate if you get a count of documents using the Elasticsearch APIs? If not, the issue is with the kopf plugin. If so, can you let us know and we'll probably need to gather more information from you? Let's a get a replication first solely within Elasticsearch though.
Thanks. Like so:
`[root@rap-es2 ~]# for i in $(seq 10);do !!;sleep 10;done
for i in $(seq 10);do curl 'http://localhost:9200/_cat/count?v';echo;sleep 10;done
epoch timestamp count
1452830455 23:00:55 621610925
maybe I have a too old ES? ➜ ES rpm -qa| grep elas elasticsearch-1.2.4-1.noarch ➜ ES curl -s -XGET localhost:9200/_all/_mappings ;echo No handler found for uri [/_all/_mappings] and method [GET] ➜ ES
One more question Jason.... How do I fix this now? This is defined in many (actually not all) of my indexes.... I guess I need to update the mapping for each... but would that also remove the ttl for already indexed documents?
Correct, you need to update the mappings. Disabling the TTL on the index level will stop the purge thread from purging expired documents from the index, but it will not remove the _ttl field from the documents.
I think that's been there since #1791 which is pre-1.2. But it's exactly because that flag is marked as experimental that I would update your mappings.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.