Brian,
Thanks for clarification.
*By default, it handles TTL cleanup once per minute (if I remember
correctly).*
If i'm not mistaken, Do you mean the record will be deleted & I should not
see the record when i search again after one minute of TTL.
*If the TTL value is negative I throw away the document as if it never came
back. A negative value only means that the document has expired but ES
hasn't yet run its cleanup to actually delete it.*
I don't see a TTL value returned in the response. so the TTL is not set ?
I set TTL as below - Not sure its correct. I'm using river JDBC.
PUT /*_river*/my_jdbc_river/_meta
{
"type" : "jdbc",
"jdbc" : {
"strategy" : "oneshot",
"driver" : "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"url" : "jdbc:sqlserver://localhost:1433;databaseName=cdt",
"user" : "CDT_Admin",
"password" : "cdtpassword",
"index": "local-test",
* "ttl" : { "enabled" : true, "default" : "3m" },*
"type": "logs-test",
"sql": "select [AccountContextId] AS
_id,[NumberOfPhoneLines],[AccountNumber],TransactionTime from
AccountInformation.CustomerInformation"
}
}
Arun
On Thursday, March 27, 2014 4:28:37 PM UTC-4, InquiringMind wrote:
>
> Arun,
>
> *Getting error when i applied TTL while creating Index. Able to search
>> data. I set TTL for 4m , after 4m still i see data available. How to make
>> TTL work and delete records after specified time. *
>>
>
> TTL processing is not something that can be depended upon to delete a
> document *exactly* after a specified amount of time; instead it is kind
> of lazy to keep performance as high as possible. By default, it handles TTL
> cleanup once per minute (if I remember correctly).
>
> What I've done when using TTL is to get the TTL value from each document
> that is returned in a response. If the TTL value is negative I throw away
> the document as if it never came back. A negative value only means that the
> document has expired but ES hasn't yet run its cleanup to actually delete
> it.
>
> Many people use the HTTP REST interface directly; I prefer writing Java.
> This makes a lot of the work with ES much easier, as I can more tightly
> integrate my follow-on wrapping with ES and make ES sparkle and shine even
> more. I also can incorporate my business logic in my Java layer and present
> a more directed interface to clients. This, by the way, is common even in
> the commercial relational database (RDB) world; our RDB work wraps custom
> DAOs around the RDB to handle our business logic; we never permit direct
> SQL to the database.
>
> I hope this helps.
>
>
>>
>> *I'm using elasticsearch 1.09 (latest).*
>>
>
> Actually, Elasticsearch 1.1.0 is now the latest.
>
> Brian
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/4a236967-67f9-4a50-bda7-4603123d7317%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.