H,
I have followed :
https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html#indices-rollover-index
I have created an empty index :
PUT /%3Ccdr-%7Bnow%2Fd%7D-1%3E
{
"aliases": {
"cdrnew": {}
},
"mappings": {
"properties": {
"ING_SIGNAL_START_TIME": {
"type": "date"
},
.......
and wrote a spark program that write into cdrnew index.
Kibana shows that : 349080 documents has been writeen into index named : cdr-2019.09.21-1
so far so good.
Now, i have added a new condition :
POST /cdrnew/_rollover
{
"conditions": {
"max_age": "1d",
"max_docs": "1000"
}
}
Bellow is the output of the command:
{
"acknowledged" : true,
"shards_acknowledged" : true,
"old_index" : "cdr-2019.09.21-1",
"new_index" : "cdr-2019.09.22-000002",
"rolled_over" : true,
"dry_run" : false,
"conditions" : {
"[max_age: 1d]" : false,
"[max_docs: 1000]" : true
}
}
After a while , 68000 documents has been written into cdr-2019.09.22-000002 , but new index DID NOT created.
[elasticsearch@elk7-lab ~]$ curl -X GET 'http://172.xx.xxx.xx:9200/_cat/aliases?v'
alias index filter routing.index routing.search
cdrnew cdr-2019.09.22-000002 - - -
.kibana .kibana_1 - - -
[elasticsearch@elk7-lab ~]$ curl -X GET 'http://172.xx.xxx.xx:9200/_cat/indices?v'
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open cdr-2019.09.21-1 JQA4R5o1STK7JSmxZU1Kgw 1 1 349080 0 270.7mb 270.7mb
yellow open cdr-2019.09.22-000002 ljMYzX7TSM-MdSz7D2Qung 1 1 68503 0 54.6mb 54.6mb
....
green open .kibana_1 glHk1hRAQ8GGyUNf_xjB6w 1 0 47 22 99.6kb 99.6kb
green open .monitoring-es-7-2019.09.19 G9Hw6QfVQuC8F-VOoQvXUQ 1 0 181881 224144 105.9mb 105.9mb
I expect that after 1000 document a new index : cdr-2019.09.22-000003 will be created
Can you please explain why it didnt happened ?
Also why "[max_age: 1d]" got the value "false"
Thanks
Yoav