Hi,

This is how we do it in our Solr 3.4 setup:

curl http://<solrip>:<port>/solr/update?commit=true --data-binary
'<delete><query>here_goes_the_query</query></delete>' -H
'Content-type:text/xml'


i.e. no extra <update>, </update> tags surrounding the <delete> tags.


HTH,


Dmitry


On Mon, Oct 22, 2012 at 10:29 AM, Markus.Mirsberger <
markus.mirsber...@gmx.de> wrote:

> Hi,
>
> I am trying to delete a some documents in my index by query.
> When I 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 '<update><delete><query>-**
> field:*somename/</query></**delete></update>';
>
> And here the response:
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">11091</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
>



-- 
Regards,

Dmitry Kan

Reply via email to