Hello,
I used following API to set index refresh_interval to zero [yes, I want to refresh an index immediately ]
PUT localhost:9200/indexname/_settings
{
"index" : {
"refresh_interval" :"0"
}
}
GET localhost:9200/indexname/_settings
result
{
"indexname": {
"settings": {
"index": {
"refresh_interval": "0",
"number_of_shards": "5",
"provided_name": "indexname",
"creation_date": "1489749844952",
"number_of_replicas": "1",
"uuid": "TKovyYpwRdeqsA__Qj0Pww",
"version": {
"created": "5020199"
}
}
}
}
}
BUT IF I INSERT ANY NEW DOCUMENT, IT DOESN'T REFLECT AT ALL.
dadoonet
(David Pilato)
March 20, 2017, 2:02pm
2
I don't believe it can be set to 0
. FWIW I believe that 0 means no refresh here.
But please even if this would be possible, never ever do such a thing.
Elasticsearch is not designed to provide real time search.
Going close to 0 is going to cost you a lot.
But why do you need this in the first place?
1 Like
Hi @dadoonet ,
We need this only during development, default refresh_interval is 1s, which takes time if we have to verify during development.
So we want to set it for an immediate refresh once insert or update the document.
dadoonet
(David Pilato)
March 21, 2017, 5:20am
4
system
(system)
Closed
April 18, 2017, 5:20am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.