You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here the results from console i have for each documented units:
(new Nest.Time("1y")).Milliseconds give: 31536000000 (new Nest.Time("1M")).Milliseconds give:1 ==> only 1 milliseconds for 1 month !!
(new Nest.Time("1w")).Milliseconds give:604800000
(new Nest.Time("1d")).Milliseconds give:86400000
(new Nest.Time("1h")).Milliseconds give:3600000
(new Nest.Time("1m")).Milliseconds give:60000
(new Nest.Time("1s")).Milliseconds give:1000
(new Nest.Time("1ms")).Milliseconds give:1
Other strange thing, When i use "2M" to define TTL on my mapping it result to a TTL of 120000 (2 minutes), here the code:
esClient.CreateIndex("MyIndex", index =>index.Mappings(mapping =>mapping.Map<MyType>(m =>m// TTL Configuration.TtlField(ttl =>ttl.Enable(true).Default("2M")))));
The text was updated successfully, but these errors were encountered:
To be clear though, new Time("1M").Milliseconds will now be -1. We can't accurately calculate milliseconds for months or years since their lengths may vary (30 vs 31 days or 366 vs 365 days). We would opt to make Milliseconds nullable instead, but that would be a breaking change.
In regards to the second part of this issue (setting ttl to 2M) is also fixed (via 116b117).
Hi,
With Elasticsearch.Net 2.0.2.0 and Nest, the Time string convertion do not work for "month" like specified in documentation here: https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units
Here the results from console i have for each documented units:
(new Nest.Time("1y")).Milliseconds give: 31536000000
(new Nest.Time("1M")).Milliseconds give:1 ==> only 1 milliseconds for 1 month !!
(new Nest.Time("1w")).Milliseconds give:604800000
(new Nest.Time("1d")).Milliseconds give:86400000
(new Nest.Time("1h")).Milliseconds give:3600000
(new Nest.Time("1m")).Milliseconds give:60000
(new Nest.Time("1s")).Milliseconds give:1000
(new Nest.Time("1ms")).Milliseconds give:1
Other strange thing, When i use "2M" to define TTL on my mapping it result to a TTL of 120000 (2 minutes), here the code:
The text was updated successfully, but these errors were encountered: