Hi

Thanks for your quick reply.

" since your time_to_live_s and expire_at_dt fields are both
stored, can you confirm that a expire_at_dt field is getting popularted by
the update processor by doing as simple query for your doc (ie
q=id:10seconds) "

No, expire_at_dt field does not get populated when we have added document
with the TTL defined in the TTL field. Like with following query,

curl -X POST -H 'Content-Type: application/json' '
http://localhost:8983/solr/collection1/update?commit=true' -d
'[{"id":"10seconds","time_to_live_s":"+10SECONDS"}]'

and when document retrieved, it gives following result (Can see that
expire_at_dt field is not showing at all).

curl -H 'Content-Type: application/json' '
http://localhost:8983/solr/collection1/select?q=id:10seconds&wt=json&indent=true
'

{
  "responseHeader":{
    "status":0,
    "QTime":19,
    "params":{
      "indent":"true",
      "q":"id:10seconds",
      "wt":"json"}},
  "response":{"numFound":1,"start":0,"docs":[
      {
        "id":"10seconds",
        "time_to_live_s":"+10SECONDS",
        "_version_":1494171978430414848}]
  }}


While if document is added with the TTL value defined explicitly in
expire_at_dt field, like,

curl -X POST -H 'Content-Type: application/json' '
http://localhost:8983/solr/collection1/update?commit=true' -d
'[{"id":"10seconds","expire_at_dt":"NOW+10SECONDS"}]'

We can see the document with expire_at_dt field populated.

curl -H 'Content-Type: application/json' '
http://localhost:8983/solr/collection1/select?q=id:10seconds&wt=json&indent=true
'
{
  "responseHeader":{
    "status":0,
    "QTime":2,
    "params":{
      "indent":"true",
      "q":"id:10seconds",
      "wt":"json"}},
  "response":{"numFound":1,"start":0,"docs":[
      {
        "id":"10seconds",
        "expire_at_dt":"2015-02-26T12:27:31.983Z",
        "_version_":1494172190095966208}]
  }}

Thanks,
Makailol

On Wed, Feb 25, 2015 at 10:00 PM, Chris Hostetter <hossman_luc...@fucit.org>
wrote:

>
> : Following query posts a document and sets "expire_at_dt" explicitly. That
> : is working perfectly ok and ducument expires at defined time.
>
> so the delete trigge logic is working correctly...
>
> : But when trying to post with TTL (following query), document does not
> : expire after given time.
>
> ...which suggests that the TTL->expire_at logic is not being applied
> properly.
>
> which is weird.
>
> since your time_to_live_s and expire_at_dt fields are both
> stored, can you confirm that a expire_at_dt field is getting popularted by
> the update processor by doing as simple query for your doc (ie
> q=id:10seconds)
>
> (either way: i can't explain why it's not getting deleted, but it would
> help narrow down where the problem is)
>
>
> -Hoss
> http://www.lucidworks.com/
>

Reply via email to