On Mon, Nov 30, 2020, 9:15 PM Pushkar Mishra <pushkarm...@gmail.com> wrote:

> Hi Erick,
> First of all thanks for your response . I will check the possibility  .
> Let me explain my problem  in detail :
>
> 1. We have other use cases where we are making use of listener on
> postCommit to delete/shift/split the shards . So we have capability to
> delete the shards .
> 2. The current use case is , where we have to delete the documents from
> the shard , and during deletion process(it will be scheduled process, may
> be hourly or daily, which will delete the documents) , if shards  gets
> empty (or may be lets  say nominal documents are left ) , then delete the
> shard.  And I am exploring to do this using configuration .
>
3. Also it will not be in live shard for sure as only those documents are
deleted which have TTL got over . TTL could be a month or year.

Please assist if you have any config based idea on this

> Regards
> Pushkar
>
> On Mon, Nov 30, 2020, 8:48 PM Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> Are you using the implicit router? Otherwise you cannot delete a shard.
>> And you won’t have any shards that have zero documents anyway.
>>
>> It’d be a little convoluted, but you could use the collections COLSTATUS
>> Api to
>> find the names of all your replicas. Then query _one_ replica of each
>> shard with something like
>> solr/collection1_shard1_replica_n1/q=*:*&distrib=false
>>
>> that’ll return the number of live docs (i.e. non-deleted docs) and if
>> it’s zero
>> you can delete the shard.
>>
>> But the implicit router requires you take complete control of where
>> documents
>> go, i.e. which shard they land on.
>>
>> This really sounds like an XY problem. What’s the use  case you’re trying
>> to support where you expect a shard’s number of live docs to drop to zero?
>>
>> Best,
>> Erick
>>
>> > On Nov 30, 2020, at 4:57 AM, Pushkar Mishra <pushkarm...@gmail.com>
>> wrote:
>> >
>> > Hi Solr team,
>> >
>> > I am using solr cloud.(version 8.5.x). I have a need to find out a
>> > configuration where I can delete a shard , when number of documents
>> reaches
>> > to zero in the shard , can some one help me out to achieve that ?
>> >
>> >
>> > It is urgent , so a quick response will be highly appreciated .
>> >
>> > Thanks
>> > Pushkar
>> >
>> > --
>> > Pushkar Kumar Mishra
>> > "Reactions are always instinctive whereas responses are always well
>> thought
>> > of... So start responding rather than reacting in life"
>>
>>

Reply via email to