Thanks Ryan. I need to use query since I am deleting a range of documents.
>From your
comment, I wasn't sure if one doesn't need to do an explicit commit when
using delete by query.
Does delete by query not need an explicit commit.

Thanks.


ryan mckinley wrote:
> 
> escher2k wrote:
>> I am trying to remove documents from my index using "delete by query".
>> However when I did this, the deleted
>> items seem to remain. This is the format of the XML file I am using -
>> 
>> <delete><query>load_id:20070424150841</query></delete>
>> <delete><query>load_id:20070425145301</query></delete>
>> <delete><query>load_id:20070426145301</query></delete>
>> <delete><query>load_id:20070427145302</query></delete>
>> <delete><query>load_id:20070428145301</query></delete>
>> <delete><query>load_id:20070429145301</query></delete>
>> 
>> When I do the deletes individually, it seems to work (i.e. create each of
>> the above in a separate file). Does this
>> mean that each delete query request has to be executed separately ?
>> 
> 
> correct, delete (unlike <add>) only accepts one command.
> 
> Just to note, if "load_id" is your unique key, you could also use:
>   <delete><id>20070424150841</id></delete>
> 
> This will give you better performance and does not commit the changes 
> until you explicitly send <commit/>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Delete-from-Solr-index...-tf3673529.html#a10265040
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to