solrServer.deleteByQuery("*:* AND -version_uuid:e04534e2-28db-4420-a5f3-300477872c11"); Should do the trick.
-----Original Message----- From: Noam G. [mailto:noam...@gmail.com] Sent: 25 January 2010 13:58 To: solr-user@lucene.apache.org Subject: Delete by query Hi, I have an index with 3M docs. Each doc has a field calld version_uuid. I want to delete all docs that theire version_uuid is other then 'e04534e2-28db-4420-a5f3-300477872c11' (for example :-)) This is the query I submit to the SolrServer object using the deleteByQuery method: "NOT version_uuid:e04534e2-28db-4420-a5f3-300477872c11" I also tried: "-version_uuid:e04534e2-28db-4420-a5f3-300477872c11" But still all docs are there. Any ideas? Am I doing somthing wrong? Noam. -- View this message in context: http://old.nabble.com/Delete-by-query-tp27306968p27306968.html Sent from the Solr - User mailing list archive at Nabble.com. Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases.