Reading https://lucidworks.com/blog/document-expiration/

It seems that your Delete check interval granularity is 30 seconds,
but your TTL is 10 seconds. Have you tried setting
autoDeletePeriodSeconds to something like 2 seconds and seeing if the
problem goes away due to more frequent checking of items to delete?

Also, even with the current setup, you should be observing the record
being deleted if not 10 seconds after than 30 seconds. Are you seeing
it not deleted at all?

Regards,
   Alex.
----
Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 25 February 2015 at 01:51, Makailol Charls <4extrama...@gmail.com> wrote:
> Hello,
>
> We are trying to add documents in solr with ttl defined(document expiration
> feature), which is expected to expire at specified time, but it is not.
>
> Following are the settings we have defined in solrconfig.xml and
> managed-schema.
>
> solr version : 5.0.0
> *solrconfig.xml*
> -----------------------
>     <updateRequestProcessorChain default="true">
>     <processor class="solr.processor.DocExpirationUpdateProcessorFactory">
>       <int name="autoDeletePeriodSeconds">30</int>
>       <str name="ttlFieldName">time_to_live_s</str>
>       <str name="expirationFieldName">expire_at_dt</str>
>     </processor>
>     <processor class="solr.LogUpdateProcessorFactory" />
>     <processor class="solr.RunUpdateProcessorFactory" />
>   </updateRequestProcessorChain>
>
> *managed-schema*
> -----------------------
>     <field name="id" type="string" indexed="true" stored="true"
> multiValued="false" />
>     <field name="time_to_live_s" type="string" stored="true"
> multiValued="false" />
>     <field name="expire_at_dt" type="date" stored="true"
> multiValued="false" />
>
> *solr query*
> --------------------
> Following query posts a document and sets "expire_at_dt" explicitly. That
> is working perfectly ok and ducument expires at defined time.
>
> curl -X POST -H 'Content-Type: application/json' '
> http://localhost:8983/solr/collection1/update?commit=true' -d '[{
> "id":"10seconds","expire_at_dt":"NOW+10SECONDS"}]'
>
>
> But when trying to post with TTL (following query), document does not
> expire after given time.
>
> curl -X POST -H 'Content-Type: application/json' '
> http://localhost:8983/solr/collection1/update?commit=true' -d '[{
> "id":"10seconds","time_to_live_s":"+10SECONDS"}]'
>
> Any help would be appreciated.
>
> Thanks,
> Makailol

Reply via email to