Transport client TTL, seconds or milliseconds

I'm performing writes with the transport client.

I can't find documentation for whether the ttl is in seconds or
milliseconds.

I know if you send documents via json the TTL is a strong so you can say
"1s" but the setTTL method in IndexRequestBuilder just takes a long.

I THINK it's seconds because my documents are staying around too long (as
I"m setting them in ms).

Can anyone confirm?

The Javadoc probably should be updated to reflect this as I couldn't find
it anywhere. IE it's not in the RTFM

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/883794e5-e0ae-43eb-a3e1-58979bd8a183%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I agree.

We should have both a Javadoc and some explanations in the java API documentation.

Wanna contribute and send a PR for the javadoc or for both?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 8 déc. 2014 à 17:43, Kevin Burton burtonator@gmail.com a écrit :

I'm performing writes with the transport client.

I can't find documentation for whether the ttl is in seconds or milliseconds.

I know if you send documents via json the TTL is a strong so you can say "1s" but the setTTL method in IndexRequestBuilder just takes a long.

I THINK it's seconds because my documents are staying around too long (as I"m setting them in ms).

Can anyone confirm?

The Javadoc probably should be updated to reflect this as I couldn't find it anywhere. IE it's not in the RTFM

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/883794e5-e0ae-43eb-a3e1-58979bd8a183%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/883794e5-e0ae-43eb-a3e1-58979bd8a183%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/E31CAE39-8F43-4488-BDB5-96B0C1421A7D%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Ha. Generally speaking, yes, I would, but I don't have an answer whether
it's in seconds or milliseconds :slight_smile:

If I get an answer I'll try it and if it works I'll update the docs.

Kevin

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/44c29924-a243-4071-b792-cbba6e4cf95d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

From my tests, it’s ms:

IndexRequest indexRequest = new IndexRequest("ttl", "doc", "1")
.source(jsonBuilder().startObject().field("foo", "bar").endObject())
.ttl(1000L);

Means 1s delay

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 8 déc. 2014 à 19:27, Kevin Burton burtonator@gmail.com a écrit :

Ha. Generally speaking, yes, I would, but I don't have an answer whether it's in seconds or milliseconds :slight_smile:

If I get an answer I'll try it and if it works I'll update the docs.

Kevin

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/44c29924-a243-4071-b792-cbba6e4cf95d%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/44c29924-a243-4071-b792-cbba6e4cf95d%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/21A0B409-2A07-42B6-ABD7-DE62758C730D%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.