You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Matthieu Labour <ma...@yahoo.com> on 2010/02/12 19:00:24 UTC
expire/delete documents
HiIs there a way for solr or lucene to expire documents based on a field in a document. Let's say that I have a createTime field whose type is date, can i set a policy in schema.xml for solr to delete the documents older than X days?Thank you
RE: expire/delete documents
Posted by Fuad Efendi <fu...@efendi.ca>.
> or since you specificly asked about delteing anything older
> then X days (in this example i'm assuming x=7)...
>
> <delete><query>createTime:[NOW-7DAYS TO *]</query></delete>
createTime:[* TO NOW-7DAYS]
Re: expire/delete documents
Posted by Chris Hostetter <ho...@fucit.org>.
: You could easily have a scheduled job that ran delete by query to
: remove posts older than a certain date...
or since you specificly asked about delteing anything older
then X days (in this example i'm assuming x=7)...
<delete><query>createTime:[NOW-7DAYS TO *]</query></delete>
-Hoss
Re: expire/delete documents
Posted by Mat Brown <ma...@patch.com>.
You could easily have a scheduled job that ran delete by query to
remove posts older than a certain date...
On Fri, Feb 12, 2010 at 13:00, Matthieu Labour
<ma...@yahoo.com> wrote:
> HiIs there a way for solr or lucene to expire documents based on a field in a document. Let's say that I have a createTime field whose type is date, can i set a policy in schema.xml for solr to delete the documents older than X days?Thank you
>
>
>