Hi
  I have checked the src in
DistributedUpdateProcessor.doDeleteByQuery(DeleteUpdateCommand cmd) as[1]

  According to the source code,it seems that  ShardParams._ROUTE_ (_route_)
and the ShardParams.SHARD_KEYS(shard.keys)
would be used to find the right shard.
  Compared to my last two posts,the shards is not the right properity to
identify the right shards that really need to delete the docs.


  Am I right?
  Does it need to add the processeing  about the shards to unify the
process?


[1]---------------------------------------------------------------------------------------------------------------------------------------------------
..omitted..
      String route = params.get(ShardParams._ROUTE_);
      if(route == null) route = params.get(ShardParams.SHARD_KEYS);//
deprecated . kept for backcompat
      Collection<Slice> slices = coll.getRouter().getSearchSlices(route,
params, coll);
      List<Node> leaders =  new ArrayList<>(slices.size());
      for (Slice slice : slices) {
             ..omitted..
             cmdDistrib.distribDelete(cmd, leaders, outParams);
             ..omitted..
       }

..omitted..

-----------------------------------------------------------------------------------------------------------------------------------------------------


Regards.


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

> 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