My bad... my answer is wrong. It's deleting only the data from the last
three days, which is the opposite that you want..

Please check Erick's answer.

Sorry.

On Thu, Dec 28, 2017 at 6:39 PM Alessandro Hoss <aleh...@gmail.com> wrote:

> Hello,
>
> You can use the same behavior as the delete all
> <https://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F>,
> but instead of querying for "*:*", you should query for something like
> "yourdatefield:[NOW-3DAYS TO NOW]"
>
> If you need to round to the start of the third day before today and the
> end of today you can use "[NOW/DAY-3DAYS TO NOW/DAY+1DAY-1SECOND]"
>
> See also working with dates
> <https://lucene.apache.org/solr/guide/7_2/working-with-dates.html>
>
> --
> Alessandro Hoss
>
> On Thu, Dec 28, 2017 at 5:02 PM ppeddi <phani.pe...@gmail.com> wrote:
>
>> hi,
>> Can anyone please post the syntax or some examples for deleting solr data
>> and index older than 3 days based on datetime field in solr collection.
>>
>> I have field data_Start_time which stores the date value in and is of type
>> 'date' in my solr collection. I want to delete the index/data older than 3
>> days and then optimize the collection.
>>
>> Please let me know the syntax.
>>
>> Thanks,
>> Ppeddi
>>
>>
>>
>>
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>>
>

Reply via email to