Hello,
I have the following index:
[root@jupiter ventus]# curl -XGET 'http://jupiter:9200/190_0?pretty=true'
{
"190_0" : {
"aliases" : { },
"mappings" : {
"190" : {
"dynamic" : "strict",
"_all" : {
"enabled" : false
},
"_timestamp" : {
"enabled" : false
},
"_ttl" : {
"enabled" : true
},
"properties" : {
"cacheId" : {
"type" : "string",
"index" : "no"
},
"client_code" : {
"type" : "string",
"index" : "not_analyzed"
},
"creationTime" : {
"type" : "long"
},
"criterion_code" : {
"type" : "string",
"index" : "not_analyzed"
},
"hotel_code" : {
"type" : "string",
"index" : "not_analyzed"
},
"room" : {
"type" : "nested",
"properties" : {
"room_adults" : {
"type" : "integer"
},
"room_children" : {
"type" : "integer"
}
}
}
}
}
},
"settings" : {
"index" : {
"creation_date" : "1449158274798",
"indices" : {
"ttl" : {
"interval" : "30s"
}
},
"uuid" : "74l_yrQ6TyWxg38vC3Qfbg",
"store" : {
"type" : "default"
},
"number_of_replicas" : "0",
"number_of_shards" : "1",
"refresh_interval" : "10000ms",
"version" : {
"created" : "2000099"
}
}
},
"warmers" : { }
}
}
Now I index 3 documents correctly:
[root@jupiter ventus]# curl -XPUT 'http://jupiter:9200/190_0/190/3' -d '{ "cacheId" : "3" }'
[root@jupiter ventus]# curl -XPUT 'http://jupiter:9200/190_0/190/2' -d '{ "cacheId" : "2" }'
[root@jupiter ventus]# curl -XPUT 'http://jupiter:9200/190_0/190/1' -d '{ "cacheId" : "1" }'
This index has a refresh interval of 10 seconds, but:
- After indexing the first document (id=3), it becomes visible at search time after 5 seconds.
- After indexing the second document (id=2), it's visible at search time after 7 seconds.
- After indexing the third document (id=1), it's visible at search time after 3 seconds.
These times change, sometimes after indexing a document it takes just 1 seconds to become visible, sometimes takes 5 seconds, ... but always before 10 seconds.
The search I'm performing every second to check visibility is:
[root@jupiter ventus]# curl -XGET 'http://jupiter:9200/190_0/190/_search?q=*:*&pretty=true'
Why is not ES respecting the 10 seconds refresh interval? I understand that after indexing each document, they not should visible until 10 seconds later.
Something misconfigured in the index?
Thanks.