Cannot disable field cache expiration

I've changed the default expiration of an index, setting it to some value.
Then I want to get it back to the original non-expiring mode, setting
index.cache.field.expire:-1 in the index update settings API.
When I do that and try to query the index I get the following error:

IllegalArgumentException[duration cannot be negative: -1000000 NANOSECONDS]

I've seen some people complaining about this before. Is there another way
to disable expiration again on the field cache?

--

The default should be to not have expiration on the field cache. Expiration
is only set if explicitly defined:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/cache/field/data/resident/ResidentFieldDataCache.java#L79

On Thu, Dec 6, 2012 at 11:42 AM, Rotem rotem.hermon@gmail.com wrote:

I've changed the default expiration of an index, setting it to some value.
Then I want to get it back to the original non-expiring mode, setting
index.cache.field.expire:-1 in the index update settings API.
When I do that and try to query the index I get the following error:

IllegalArgumentException[duration cannot be negative: -1000000 NANOSECONDS]

I've seen some people complaining about this before. Is there another way
to disable expiration again on the field cache?

--

--

Yes, but once you set it, how do you unset it? The documentation says "-1"
is the default value (that states no expiration), this is obviously not the
case. So how do you change it back to have no expiration?

On Thu, Dec 6, 2012 at 9:49 PM, Ivan Brusic ivan@brusic.com wrote:

The default should be to not have expiration on the field cache.
Expiration is only set if explicitly defined:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/cache/field/data/resident/ResidentFieldDataCache.java#L79

On Thu, Dec 6, 2012 at 11:42 AM, Rotem rotem.hermon@gmail.com wrote:

I've changed the default expiration of an index, setting it to some value.
Then I want to get it back to the original non-expiring mode, setting
index.cache.field.expire:-1 in the index update settings API.
When I do that and try to query the index I get the following error:

IllegalArgumentException[duration cannot be negative: -1000000
NANOSECONDS]

I've seen some people complaining about this before. Is there another way
to disable expiration again on the field cache?

--

--

--

Sorry, I did not read your original request fully. Multitasking is bad!

My assumption was tthat Settings are only read at start time, but it
appears that those settings are "dynamic" and there is a listener. Never
realized that.

The limitation seems to be on Guava. Have you tried setting it to 0?

On Thu, Dec 6, 2012 at 11:52 AM, Rotem Hermon rotem.hermon@gmail.comwrote:

Yes, but once you set it, how do you unset it? The documentation says "-1"
is the default value (that states no expiration), this is obviously not the
case. So how do you change it back to have no expiration?

On Thu, Dec 6, 2012 at 9:49 PM, Ivan Brusic ivan@brusic.com wrote:

The default should be to not have expiration on the field cache.
Expiration is only set if explicitly defined:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/cache/field/data/resident/ResidentFieldDataCache.java#L79

On Thu, Dec 6, 2012 at 11:42 AM, Rotem rotem.hermon@gmail.com wrote:

I've changed the default expiration of an index, setting it to some
value.
Then I want to get it back to the original non-expiring mode, setting
index.cache.field.expire:-1 in the index update settings API.
When I do that and try to query the index I get the following error:

IllegalArgumentException[duration cannot be negative: -1000000
NANOSECONDS]

I've seen some people complaining about this before. Is there another
way to disable expiration again on the field cache?

--

--

--

--

Yes, tried "0", it just kills the cache.

On Thu, Dec 6, 2012 at 10:06 PM, Ivan Brusic ivan@brusic.com wrote:

Sorry, I did not read your original request fully. Multitasking is bad!

My assumption was tthat Settings are only read at start time, but it
appears that those settings are "dynamic" and there is a listener. Never
realized that.

The limitation seems to be on Guava. Have you tried setting it to 0?

http://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/cache/CacheBuilder.java#640

On Thu, Dec 6, 2012 at 11:52 AM, Rotem Hermon rotem.hermon@gmail.comwrote:

Yes, but once you set it, how do you unset it? The documentation says
"-1" is the default value (that states no expiration), this is obviously
not the case. So how do you change it back to have no expiration?

On Thu, Dec 6, 2012 at 9:49 PM, Ivan Brusic ivan@brusic.com wrote:

The default should be to not have expiration on the field cache.
Expiration is only set if explicitly defined:

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/cache/field/data/resident/ResidentFieldDataCache.java#L79

On Thu, Dec 6, 2012 at 11:42 AM, Rotem rotem.hermon@gmail.com wrote:

I've changed the default expiration of an index, setting it to some
value.
Then I want to get it back to the original non-expiring mode, setting
index.cache.field.expire:-1 in the index update settings API.
When I do that and try to query the index I get the following error:

IllegalArgumentException[duration cannot be negative: -1000000
NANOSECONDS]

I've seen some people complaining about this before. Is there another
way to disable expiration again on the field cache?

--

--

--

--

--