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 Tracy Flynn <tr...@zoemail.net> on 2008/05/22 04:16:29 UTC
Delete by multiple query doesn't seem to work
I'm trying to exploit 'Delete by Query' with multiple IDs in the query.
I'm using vanilla SOLR 1.2
My schema specifies.
<uniqueKey>document_id</uniqueKey>
My unique document ids are of the form 'A-xxx' , 'T-xxx" and so on.
The following individual delete works:
curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-
binary '<delete><id>A-3545</id></delete>'
curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-
binary '<commit waitFlush="false" waitSearcher="false"/>'
I've tried both of the following without successfully deleting anything.
Attempt 1:
curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-
binary '<delete><query>id:A-395 OR id:A-1949</query></delete>'
curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-
binary '<commit waitFlush="false" waitSearcher="false"/>'
Attempt 2:
curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-
binary '<delete><query>document_id:A-395 OR document_id:A-1949</
query></delete>'
curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-
binary '<commit waitFlush="false" waitSearcher="false"/>'
Any hints / ideas as to what I'm doing wrong, or where to look for the
problem?
Tracy
Re: Delete by multiple query doesn't seem to work
Posted by Chris Hostetter <ho...@fucit.org>.
: Thanks for the suggestion. It didn't do anything.
FWIW: If you have a query (any query) that returns result when you use the
sstandard request handler, but does not delete any docs when sent in a
<delete><query>...</query></delete> update command, then that is a bug.
A reproducable test case filed in Jira would be appreciated.
I just tested the following delete command using the example schema/docs,
and the two docs in question were both deleted correctly.
<delete><query>id:TWINX2048-3200PRO OR id:VS1GB400C3</query></delete>
-Hoss
Re: Delete by multiple query doesn't seem to work
Posted by Tracy Flynn <tr...@zoemail.net>.
Thanks for the suggestion. It didn't do anything.
I ended up redoing the deletes as a set of individual <delete><id>xxx</
id></delete> requests, POSTed one at a time over an open HTTP
connection (as suggested in another email thread on the issue).
On May 22, 2008, at 12:39 AM, Shalin Shekhar Mangar wrote:
> Not sure, but try using:
>
> <delete><query>document_id:"A-395" OR document_id:"A-1949"</query></
> delete>
>
> On Thu, May 22, 2008 at 7:46 AM, Tracy Flynn
> <tr...@zoemail.net> wrote:
>>
>> I'm trying to exploit 'Delete by Query' with multiple IDs in the
>> query.
>>
>> I'm using vanilla SOLR 1.2
>>
>> My schema specifies.
>>
>> <uniqueKey>document_id</uniqueKey>
>>
>> My unique document ids are of the form 'A-xxx' , 'T-xxx" and so on.
>>
>> The following individual delete works:
>>
>> curl http://work:8983/solr/update -H "Content-Type: text/xml" --
>> data-binary
>> '<delete><id>A-3545</id></delete>'
>> curl http://work:8983/solr/update -H "Content-Type: text/xml" --
>> data-binary
>> '<commit waitFlush="false" waitSearcher="false"/>'
>>
>> I've tried both of the following without successfully deleting
>> anything.
>>
>> Attempt 1:
>>
>> curl http://work:8983/solr/update -H "Content-Type: text/xml" --
>> data-binary
>> '<delete><query>id:A-395 OR id:A-1949</query></delete>'
>> curl http://work:8983/solr/update -H "Content-Type: text/xml" --
>> data-binary
>> '<commit waitFlush="false" waitSearcher="false"/>'
>>
>>
>> Attempt 2:
>>
>> curl http://work:8983/solr/update -H "Content-Type: text/xml" --
>> data-binary
>> '<delete><query>document_id:A-395 OR document_id:A-1949</query></
>> delete>'
>> curl http://work:8983/solr/update -H "Content-Type: text/xml" --
>> data-binary
>> '<commit waitFlush="false" waitSearcher="false"/>'
>>
>>
>> Any hints / ideas as to what I'm doing wrong, or where to look for
>> the
>> problem?
>>
>> Tracy
>>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
Re: Delete by multiple query doesn't seem to work
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Not sure, but try using:
<delete><query>document_id:"A-395" OR document_id:"A-1949"</query></delete>
On Thu, May 22, 2008 at 7:46 AM, Tracy Flynn
<tr...@zoemail.net> wrote:
>
> I'm trying to exploit 'Delete by Query' with multiple IDs in the query.
>
> I'm using vanilla SOLR 1.2
>
> My schema specifies.
>
> <uniqueKey>document_id</uniqueKey>
>
> My unique document ids are of the form 'A-xxx' , 'T-xxx" and so on.
>
> The following individual delete works:
>
> curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-binary
> '<delete><id>A-3545</id></delete>'
> curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-binary
> '<commit waitFlush="false" waitSearcher="false"/>'
>
> I've tried both of the following without successfully deleting anything.
>
> Attempt 1:
>
> curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-binary
> '<delete><query>id:A-395 OR id:A-1949</query></delete>'
> curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-binary
> '<commit waitFlush="false" waitSearcher="false"/>'
>
>
> Attempt 2:
>
> curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-binary
> '<delete><query>document_id:A-395 OR document_id:A-1949</query></delete>'
> curl http://work:8983/solr/update -H "Content-Type: text/xml" --data-binary
> '<commit waitFlush="false" waitSearcher="false"/>'
>
>
> Any hints / ideas as to what I'm doing wrong, or where to look for the
> problem?
>
> Tracy
>
--
Regards,
Shalin Shekhar Mangar.