[
https://issues.apache.org/jira/browse/SOLR-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated SOLR-5795:
---------------------------
Attachment: SOLR-5795.patch
some baseline tests (including a watcher for the periodic delete commands) and
fleshing out some of the config validation.
I tweaked the name of the config args to try and make it more in your face that
you were enabling an "automatic deleting". From the test configs...
{code}
<updateRequestProcessorChain name="convert-ttl">
<processor class="solr.processor.DocExpirationUpdateProcessorFactory">
<str name="ttlFieldName">_ttl_</str>
<str name="expirationFieldName">_expire_at_</str>
</processor>
<processor class="solr.IgnoreFieldUpdateProcessorFactory">
<str name="fieldName">_ttl_</str>
</processor>
</updateRequestProcessorChain>
<updateRequestProcessorChain name="scheduled-delete" default="true">
<!-- NOTE: this chain is default so we can see that
autoDeleteChainName defaults to the default chain for the SolrCore
-->
<processor class="solr.processor.DocExpirationUpdateProcessorFactory">
<!-- str name="autoDeleteChainName">scheduled-delete</str -->
<int name="autoDeletePeriodSeconds">3</int>
<str name="expirationFieldName">eXpF</str>
</processor>
<processor class="solr.RecordingUpdateProcessorFactory" />
</updateRequestProcessorChain>
{code}
> Option to periodically delete docs based on an expiration field -- or ttl
> specified when indexed.
> -------------------------------------------------------------------------------------------------
>
> Key: SOLR-5795
> URL: https://issues.apache.org/jira/browse/SOLR-5795
> Project: Solr
> Issue Type: New Feature
> Reporter: Hoss Man
> Assignee: Hoss Man
> Attachments: SOLR-5795.patch, SOLR-5795.patch
>
>
> A question I get periodically from people is how to automatically remove
> documents from a collection at a certain time (or after a certain amount of
> time).
> Excluding from search results using a filter query on a date field is
> trivial, but you still have to periodically send a deleteByQuery to clean up
> those older "expired" documents. And in the case where you want all
> documents to auto-expire some fixed amount of time when they were indexed,
> you still have to setup a simple UpdateProcessorto set that expiration date.
> So i've been thinking it would be nice if there was a simple way to configure
> solr to do it all for you.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]