How to delete Solr collections data beyond 7 days

Command to delete a particular solr collection :-

Example:-

curl "http://<SOLR-HOSTNAME>:8886/solr/audit_logs/update?commit=true" -H "Content-Type: text/xml" --data-binary "<delete><query>evtTime:[* TO NOW-7DAYS]</query></delete>"

In this example,

audit_logs - is the collection name.
TO NOW-7DAYS - Will delete the data older than 7 days.


No comments:

Post a Comment

Boost Your Download Speed with lftp Segmentation

Looking for a faster way to download files via sftp to a Linux machine? Try using "lftp" instead. This tool offers segmented downl...

Other relevant topics