You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Noam G." <no...@gmail.com> on 2010/01/25 14:57:30 UTC

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.


Re: Delete by query

Posted by Lance Norskog <go...@gmail.com>.
The problem is that negative queries are ignored by Lucene. Why this
is still true I have no idea.

On Mon, Jan 25, 2010 at 6:23 AM, Noam G. <no...@gmail.com> wrote:
>
> Hi David,
>
> Thank you very much - that did the trick :-)
>
> Noam.
> --
> View this message in context: http://old.nabble.com/Delete-by-query-tp27306968p27307336.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
Lance Norskog
goksron@gmail.com

RE: Delete by query

Posted by "Noam G." <no...@gmail.com>.
Hi David,

Thank you very much - that did the trick :-)

Noam.
-- 
View this message in context: http://old.nabble.com/Delete-by-query-tp27306968p27307336.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Delete by query

Posted by Da...@ubs.com.
solrServer.deleteByQuery("*:* AND
-version_uuid:e04534e2-28db-4420-a5f3-300477872c11"); 
Should do the trick.

-----Original Message-----
From: Noam G. [mailto:noamguy@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.