Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Markus.Mirsberger

Hi,

I am trying to delete a some documents in my index by query.
When I just select them with this negated query, I get all the documents 
I want to delete but when I use this query in the DeleteByQuery it is 
not working
Im trying to delete all elements which value ends with 'somename/'  
When I use this for selection it works and I get exactly the right 
documents (about 10.000. so too many to delete one by one:) )


curl http://solrip:8080/solr/core/update/?commit=true -H 
Content-Type: text/xml --data-binary 
'updatedeletequery-field:*somename//query/delete/update';


And here the response:
?xml version=1.0 encoding=UTF-8?
response
lst name=responseHeaderint name=status0/intint 
name=QTime11091/int/lst

/response

I tried to perform it in the browser too by using /update?stream.body  
... but the result is the same.

And no Error in the Solr-Log.

I hope someone can help me ... I dont want do this manually :)

Regards,
Markus


Re: Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Patrick Plaatje
Hi Markus,

Why do you think it's not deleting amyrhing,?

Thanks,
Patrick
Op 22 okt. 2012 08:36 schreef Markus.Mirsberger markus.mirsber...@gmx.de
het volgende:

 Hi,

 I am trying to delete a some documents in my index by query.
 When I just select them with this negated query, I get all the documents I
 want to delete but when I use this query in the DeleteByQuery it is not
 working
 Im trying to delete all elements which value ends with 'somename/' 
 When I use this for selection it works and I get exactly the right
 documents (about 10.000. so too many to delete one by one:) )

 curl http://solrip:8080/solr/**core/update/?commit=true -H
 Content-Type: text/xml --data-binary 'updatedeletequery-**
 field:*somename//query/**delete/update';

 And here the response:
 ?xml version=1.0 encoding=UTF-8?
 response
 lst name=responseHeaderint name=status0/intint
 name=QTime11091/int/lst
 /response

 I tried to perform it in the browser too by using /update?stream.body  ...
 but the result is the same.
 And no Error in the Solr-Log.

 I hope someone can help me ... I dont want do this manually :)

 Regards,
 Markus



Re: Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Markus.Mirsberger

Hi, Patrick,

Because I have the same amount of documents in my index than before I 
perform the query.
And when I use the negated query just to select the documents I can see 
they still there (and of course all other documents too :) )


Regards,
Markus




On 22.10.2012 14:38, Patrick Plaatje wrote:

Hi Markus,

Why do you think it's not deleting amyrhing,?

Thanks,
Patrick
Op 22 okt. 2012 08:36 schreef Markus.Mirsberger markus.mirsber...@gmx.de
het volgende:


Hi,

I am trying to delete a some documents in my index by query.
When I just select them with this negated query, I get all the documents I
want to delete but when I use this query in the DeleteByQuery it is not
working
Im trying to delete all elements which value ends with 'somename/' 
When I use this for selection it works and I get exactly the right
documents (about 10.000. so too many to delete one by one:) )

curl http://solrip:8080/solr/**core/update/?commit=true -H
Content-Type: text/xml --data-binary 'updatedeletequery-**
field:*somename//query/**delete/update';

And here the response:
?xml version=1.0 encoding=UTF-8?
response
lst name=responseHeaderint name=status0/intint
name=QTime11091/int/lst
/response

I tried to perform it in the browser too by using /update?stream.body  ...
but the result is the same.
And no Error in the Solr-Log.

I hope someone can help me ... I dont want do this manually :)

Regards,
Markus





Re: Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Patrick Plaatje
Did you make sure to commit after the delete?

Patrick
Op 22 okt. 2012 08:43 schreef Markus.Mirsberger markus.mirsber...@gmx.de
het volgende:

 Hi, Patrick,

 Because I have the same amount of documents in my index than before I
 perform the query.
 And when I use the negated query just to select the documents I can see
 they still there (and of course all other documents too :) )

 Regards,
 Markus




 On 22.10.2012 14:38, Patrick Plaatje wrote:

 Hi Markus,

 Why do you think it's not deleting amyrhing,?

 Thanks,
 Patrick
 Op 22 okt. 2012 08:36 schreef Markus.Mirsberger 
 markus.mirsber...@gmx.de
 het volgende:

  Hi,

 I am trying to delete a some documents in my index by query.
 When I just select them with this negated query, I get all the documents
 I
 want to delete but when I use this query in the DeleteByQuery it is not
 working
 Im trying to delete all elements which value ends with 'somename/' 
 When I use this for selection it works and I get exactly the right
 documents (about 10.000. so too many to delete one by one:) )

 curl http://solrip:8080/solr/core/update/?commit=true -H
 Content-Type: text/xml --data-binary 'updatedeletequery-**
 field:*somename//query/delete/update';

 And here the response:
 ?xml version=1.0 encoding=UTF-8?
 response
 lst name=responseHeaderint name=status0/intint
 name=QTime11091/int/lst
 /response

 I tried to perform it in the browser too by using /update?stream.body
  ...
 but the result is the same.
 And no Error in the Solr-Log.

 I hope someone can help me ... I dont want do this manually :)

 Regards,
 Markus





Re: Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Markus.Mirsberger

Yes Im sure.
I commited a second time too to be sure.
And I tried to delete just one entry with the same command but without a 
negated query and this worked.

I think the problem is that its a negated query.

Markus


On 22.10.2012 14:46, Patrick Plaatje wrote:

Did you make sure to commit after the delete?

Patrick
Op 22 okt. 2012 08:43 schreef Markus.Mirsberger markus.mirsber...@gmx.de
het volgende:


Hi, Patrick,

Because I have the same amount of documents in my index than before I
perform the query.
And when I use the negated query just to select the documents I can see
they still there (and of course all other documents too :) )

Regards,
Markus




On 22.10.2012 14:38, Patrick Plaatje wrote:


Hi Markus,

Why do you think it's not deleting amyrhing,?

Thanks,
Patrick
Op 22 okt. 2012 08:36 schreef Markus.Mirsberger 
markus.mirsber...@gmx.de
het volgende:

  Hi,

I am trying to delete a some documents in my index by query.
When I just select them with this negated query, I get all the documents
I
want to delete but when I use this query in the DeleteByQuery it is not
working
Im trying to delete all elements which value ends with 'somename/' 
When I use this for selection it works and I get exactly the right
documents (about 10.000. so too many to delete one by one:) )

curl http://solrip:8080/solr/core/update/?commit=true -H
Content-Type: text/xml --data-binary 'updatedeletequery-**
field:*somename//query/delete/update';

And here the response:
?xml version=1.0 encoding=UTF-8?
response
lst name=responseHeaderint name=status0/intint
name=QTime11091/int/lst
/response

I tried to perform it in the browser too by using /update?stream.body
  ...
but the result is the same.
And no Error in the Solr-Log.

I hope someone can help me ... I dont want do this manually :)

Regards,
Markus






Re: Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Erick Erickson
3.6 has some quirks around parsing pure negative queries sometimes. Try
*:* -whatever.

BTW, a syntax I like for doing delete-by-query just in a raw URL is
http://localhost:8983/solr/collection1/update?commit=truestream.body=deletequery*:*
-store_0_coordinate:[* TO *]/query/delete

The curl you used is, of course, fine. I just find the above easier.

Best
Erick

On Mon, Oct 22, 2012 at 4:22 AM, Markus.Mirsberger
markus.mirsber...@gmx.de wrote:
 Yes Im sure.
 I commited a second time too to be sure.
 And I tried to delete just one entry with the same command but without a
 negated query and this worked.
 I think the problem is that its a negated query.

 Markus



 On 22.10.2012 14:46, Patrick Plaatje wrote:

 Did you make sure to commit after the delete?

 Patrick
 Op 22 okt. 2012 08:43 schreef Markus.Mirsberger
 markus.mirsber...@gmx.de
 het volgende:

 Hi, Patrick,

 Because I have the same amount of documents in my index than before I
 perform the query.
 And when I use the negated query just to select the documents I can see
 they still there (and of course all other documents too :) )

 Regards,
 Markus




 On 22.10.2012 14:38, Patrick Plaatje wrote:

 Hi Markus,

 Why do you think it's not deleting amyrhing,?

 Thanks,
 Patrick
 Op 22 okt. 2012 08:36 schreef Markus.Mirsberger 
 markus.mirsber...@gmx.de
 het volgende:

   Hi,

 I am trying to delete a some documents in my index by query.
 When I just select them with this negated query, I get all the
 documents
 I
 want to delete but when I use this query in the DeleteByQuery it is not
 working
 Im trying to delete all elements which value ends with 'somename/' 
 When I use this for selection it works and I get exactly the right
 documents (about 10.000. so too many to delete one by one:) )

 curl http://solrip:8080/solr/core/update/?commit=true -H
 Content-Type: text/xml --data-binary 'updatedeletequery-**
 field:*somename//query/delete/update';

 And here the response:
 ?xml version=1.0 encoding=UTF-8?
 response
 lst name=responseHeaderint name=status0/intint
 name=QTime11091/int/lst
 /response

 I tried to perform it in the browser too by using /update?stream.body
   ...
 but the result is the same.
 And no Error in the Solr-Log.

 I hope someone can help me ... I dont want do this manually :)

 Regards,
 Markus





Re: Solr3.6 DeleteByQuery not working with negated query

2012-10-22 Thread Markus.Mirsberger

Hi Erick,

thanks alot. That trick fixed it :)


Regards,
Markus


On 22.10.2012 15:43, Erick Erickson wrote:

3.6 has some quirks around parsing pure negative queries sometimes. Try
*:* -whatever.

BTW, a syntax I like for doing delete-by-query just in a raw URL is
http://localhost:8983/solr/collection1/update?commit=truestream.body=deletequery*:*
-store_0_coordinate:[* TO *]/query/delete

The curl you used is, of course, fine. I just find the above easier.

Best
Erick

On Mon, Oct 22, 2012 at 4:22 AM, Markus.Mirsberger
markus.mirsber...@gmx.de wrote:

Yes Im sure.
I commited a second time too to be sure.
And I tried to delete just one entry with the same command but without a
negated query and this worked.
I think the problem is that its a negated query.

Markus



On 22.10.2012 14:46, Patrick Plaatje wrote:

Did you make sure to commit after the delete?

Patrick
Op 22 okt. 2012 08:43 schreef Markus.Mirsberger
markus.mirsber...@gmx.de
het volgende:


Hi, Patrick,

Because I have the same amount of documents in my index than before I
perform the query.
And when I use the negated query just to select the documents I can see
they still there (and of course all other documents too :) )

Regards,
Markus




On 22.10.2012 14:38, Patrick Plaatje wrote:


Hi Markus,

Why do you think it's not deleting amyrhing,?

Thanks,
Patrick
Op 22 okt. 2012 08:36 schreef Markus.Mirsberger 
markus.mirsber...@gmx.de
het volgende:

   Hi,

I am trying to delete a some documents in my index by query.
When I just select them with this negated query, I get all the
documents
I
want to delete but when I use this query in the DeleteByQuery it is not
working
Im trying to delete all elements which value ends with 'somename/' 
When I use this for selection it works and I get exactly the right
documents (about 10.000. so too many to delete one by one:) )

curl http://solrip:8080/solr/core/update/?commit=true -H
Content-Type: text/xml --data-binary 'updatedeletequery-**
field:*somename//query/delete/update';

And here the response:
?xml version=1.0 encoding=UTF-8?
response
lst name=responseHeaderint name=status0/intint
name=QTime11091/int/lst
/response

I tried to perform it in the browser too by using /update?stream.body
   ...
but the result is the same.
And no Error in the Solr-Log.

I hope someone can help me ... I dont want do this manually :)

Regards,
Markus