Normally a delete-by-query needs to be distributed to all shards since it is not known which document keys it will affect.

It sounds like SolrCloud does not support the feature you would really like: support for distrb=false.

You can file a Jira request for a feature "improvement."

-- Jack Krupansky

-----Original Message----- From: YouPeng Yang
Sent: Monday, May 19, 2014 3:46 AM
To: solr-user@lucene.apache.org
Subject: Re: How to delete docs only in a spec shard within a collection

Hi
 Anyone gives some suggestions.


Regards


2014-05-19 11:31 GMT+08:00 YouPeng Yang <yypvsxf19870...@gmail.com>:

Hi
  I have a colloection with 3 shards.
  I want to delete some docs in one shard with the command:


http://10.1.22.1:8082/solr/tv_201402/update?&stream.body=<delete><query>BEGINTIME:["2014-03-01
00:00:00" TO *]</query></delete>&shards=tv_201402&commit=true
 As the red font exepression, It is supposed that docs only in the shard
tv_201402  whose BEGINTIME field were larger than "2014-03-01 00:00:00"
would be deleted.However ,as a result, the docs on the other shards such
astv_201403 ,tv_201404 whose BEGINTIME were also larger than 2014-03-01
00:00:00  were deleted too.
  This is not the effientlty right thing I want.

  How to delete docs only in a spec shard  within a collection which
contains several shards?

Regards.


Reply via email to