Hi Chris,

it is the same I struggled with when I started with Solr.

The ConfigSet is a set of configuration you refer to with one or more cores.
Changing settings for the core changes the ConfigSet, therefore the setting
for all cores refering that ConfigSet.

Solution: Make a full copy of a ConfigSet, when you want to change settings
for a core individually. 
We decided to keep one ConfigSet as a kind of default, not refered by any core.
It is THE template keeping all ConfigSet changes valid for all cores we have.
We copy that template and apply as much config changes programatically
as possible to that base ConfigSet. If we have to "rollback", we delete the 
core,
we delete the ConfigSet (directory), copy the default ConfigSet, add the core,
apply all config changes programatically.

I hope this helps what "cloning" means.

Regards
Andreas


-----Ursprüngliche Nachricht-----
Von: Christopher Schultz <ch...@christopherschultz.net> 
Gesendet: Mittwoch, 31. August 2022 00:22
An: users@solr.apache.org; Jan Høydahl <jan....@cominvent.com>
Betreff: Re: SOLR API - modifying the schema for one collection modifies it for 
ALL collections ?

Jan, Serban,

On 5/3/22 19:09, Jan Høydahl wrote:
> Your Collection's schema is part of a ConfigSet 
> (https://solr.apache.org/guide/8_11/config-sets.html 
> <https://solr.apache.org/guide/8_11/config-sets.html>).
> Multiple collections may use the same ConfigSet.
> The gotcha is that when you modify schema for collection A, what you really 
> do is modify the schema in the ConfigSet for collection A.
> IMO the schema API should have been part of configset api to clarify this.
> 
> You can get around this by clone your ConfigSet and create the new collection 
> using the cloned copy.

I've been playing-around with trying to programmatically alter the schema for a 
Solr core as well, and this explains a LOT of weirdness I was experiencing.

Jan, thanks for explaining the root problem, but your solution of just "cloning 
your Configset" doesn't offer much detail. How does one clone a config set? How 
does one USE a Configset? What if you need to delete a configSet to start-over?

Thanks,
-chris

>> 3. mai 2022 kl. 17:22 skrev Serban Alexe <serban.al...@gmail.com>:
>>
>> Hi all,
>>
>> I have a SOLR Server with several collections.
>>
>> To retrieve the properties of the fields, I ran these requests:
>>
>>    - GET http://localhost:8983/solr/<collection_id_1>/schema/fields
>>    - GET http://localhost:8983/solr/<collection_id_2>/schema/fields
>>
>> Then I ran a POST http://localhost:8983/solr/<collection_id_1>/schema
>> request, with the content needed to change some fields properties.
>>
>> After this, I noticed that *the same fields properties changes were 
>> also modified for* collection_id_2.
>>
>> Is this normal behaviour ?
>> What did I do wrong ?
>> Thank you.
>>
>> --
>> Şerban Alexe
> 
> 

Reply via email to