Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Expert Contributor

How to get the number of documents indexed :

curl -o /tmp/result.txt --negotiate -u : -X GET "SOLR_SERVER:8886/solr/ranger_audits_shard1_replica1/select?q=*:*&distrib=false"

How to run a delete command via curl ( delete data older than 24h 😞
curl --negotiate -u: "SOLR_SERVER:8886/solr/ranger_audits/update?commit=true" -H "Content-Type: text/xml" --data-binary "<delete><query>evtTime:[* TO NOW-24HOURS]</query></delete>"


How to run optimize command via curl :

curl --negotiate -u: "SOLR_SERVER:8886/solr/ranger_audits/update?optimize=true"
2,320 Views
0 Kudos