Archive for the ‘Solr’ Category
Solr Post.jar – post to different Solr port other than 8983
What if you want to post data to Solr instance whose http port is different from 8983 using post.jar which comes along Solr package?
For example, your Solr http address is : http://localhost:8080/solr
To post data to this Solr index: java -Durl=http://localhost:8080/solr/update -jar post.jar *.xml
That’s all…
Select/delete all items in Solr
To select all items for a field in Solr you can use the query : some_item:[* TO *], but if this field is missing from some documents you will not select those documents.
To select all documents you can use the id defined in /conf/schema.xml, for example: <uniqueKey>solr_id</uniqueKey> you can use solr_id:[* TO *].
Now that you have all documents selected you can delete them
To delete all documents in Solr use this update xml:
<delete><query>solr_id:[*TO *]</query></delete>
and of course you have to commit:
<commit />
That’s all !
Source: http://blog.tremend.ro/2007/03/02/selectdelete-all-items-in-solr/


