Mikhail/Thomas, thanks a lot for your quick answers. 

Shushuai

-----Original Message-----
From: Thomas Corthals <tho...@klascement.net> 
Sent: Tuesday, November 29, 2022 2:29 AM
To: users@solr.apache.org
Subject: [External] : Re: Update all rows with a value for one specific field 
in one core

Hi Shushuai,


Like Mikhail said, bulking your updates will be way faster than sending 
individual update requests. Depending on how large (or should I say small) the 
actual value is you're setting, you might be able to send a few hundred or even 
a few thousand updates per request.


If you're querying one million documents to update from Solr, have a look at 
Cursors in the ref guide.


https://urldefense.com/v3/__https://solr.apache.org/guide/solr/latest/query-guide/pagination-of-results.html*fetching-a-large-number-of-sorted-results-cursors__;Iw!!ACWV5N9M2RV99hQ!IBqBnIyh_LH2zMcLjZVy2qhfAB6uDpoSKrsn2Q7MlBu0Ar0RDVKisW3mlyzZbvPtVf8e8Vr_qvaV02ULsLKC$
 


Thomas

Op di 29 nov. 2022 om 07:31 schreef Mikhail Khludnev <m...@apache.org>:

> Hello Shushuai.
> There's no 'columnar update' handler which you are asking for. It 
> needs to send per doc updates, but there's much sense in bulking them 
> by sending multiple update commands per request.
>
> On Tue, Nov 29, 2022 at 6:27 AM Shushuai Zhu <shushuai....@oracle.com>
> wrote:
>
> > Hi, I know we can do something like below to update one row for one 
> > field in a solr core:
> >
> > curl 
> > https://urldefense.com/v3/__http://host:port/solr/core_1/update?commit=true__;!!ACWV5N9M2RV99hQ!IBqBnIyh_LH2zMcLjZVy2qhfAB6uDpoSKrsn2Q7MlBu0Ar0RDVKisW3mlyzZbvPtVf8e8Vr_qvaV02xdpdlc$
> >   --data-binary $'[{"id" : "1", "field1"  : {"set":"test1"} }]'
> >
> > I want to update all rows for one field with one value in a solr core.
> For
> > example, there are 1 million rows in this core_1, and I want to 
> > update
> > field1 = test1 for all documents in this core. What is the best way 
> > to do it?
> >
> > Thanks.
> >
> > Shushuai
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Reply via email to