Repository navigation
Conversation
| } | ||
|
|
||
| private void bootstrapMultilingualConf(CoreContainer coreContainer) throws IOException { | ||
| if (checkConfigExists(ConfigSetsHandler.MULTILINGUAL_CONFIGSET_NAME)) { |
There was a problem hiding this comment.
the slim distribution doesn't ship wiht multilingual...
|
Automated PR readiness judgements (LLM-generated; may be wrong; not updated on later pushes).
|
|
I am backing out the allowPath hardening for |
|
I still want to remove all the language specific stuff from |
|
|
||
| List<Language> listAvailableLanguages() throws IOException { | ||
| if (!cc.getConfigSetService().checkConfigExists(MULTILINGUAL_CONFIGSET_NAME)) { | ||
| return List.of(); |
There was a problem hiding this comment.
🤖 AI text below 🤖
On a slim installation without _multilingual, this disables the language selector even if an existing configset contains language types. For example, an upgraded cluster can retain the old _default configset in ZooKeeper. Could Designer still offer the languages from the schema being edited in that case?
There was a problem hiding this comment.
yeah, i think that's just a very narrow likelyhood. Folks using slim probably don't use the schema designer anyway...
| if (!cc.getConfigSetService().checkConfigExists(MULTILINGUAL_CONFIGSET_NAME)) { | ||
| return List.of(); | ||
| } | ||
| return loadLatestSchema(MULTILINGUAL_CONFIGSET_NAME).getFieldTypes().values().stream() |
There was a problem hiding this comment.
🤖 AI text below 🤖
Existing Designer schemas can use cz for Czech, while _multilingual supplies cs. When a user changes the language selection, the old cz value has no matching option. The sync can then remove text_cz and *_txt_cz if no explicit field uses the type. Could the selector preserve the legacy choice for existing schemas?
There was a problem hiding this comment.
I'm honestly not too worried about backwards compatiblity, just cause I think this is very small set of folks... I think we should mention this in the upgrade notes?
|
|
||
| private void bootstrapMultilingualConf() throws IOException { | ||
| if (checkConfigExists(ConfigSetsHandler.MULTILINGUAL_CONFIGSET_NAME)) { | ||
| return; |
There was a problem hiding this comment.
🤖 AI text below 🤖
The upload creates the configset znode before it writes all of the files. If the upload stops partway through, later starts see the znode and skip the upload, leaving an incomplete _multilingual configset. Another node can also see it before the upload finishes. Could bootstrap distinguish a complete upload from one still in progress or interrupted? I see that _default follows a similar path, so this may need a shared fix.
There was a problem hiding this comment.
agreed that this maybe is a place for a better handling...
|
I made a video ;-). https://share.descript.com/view/Rag9yZyjaHq |
| this.uploadConfig(confName, configPath); | ||
| } | ||
|
|
||
| private void bootstrapMultilingualConf() throws IOException { |
There was a problem hiding this comment.
There's a serious smell here that this issue should touch ConfigSetService! I'm definitely against this, sorry.
If we want to potentially upload multiple configSets to ZK, there should be a comma delimimted list somewhere and ConfigSetService should then have no hard-coded notion of multilingual; it just loops and uploads the named configsets, whatever they may be. Just an idea. OR (better, no new code), if this is just one confgset in addition to _default, then there are sys props in ConfigSetService / functionality that can be set to upload a named configset in addition.
There was a problem hiding this comment.
I actually. did think of that earlier, but then was like "let me reduce the churn and just follow the pattenr of _default, but I can make that change. We can make the set of named configsets a setting that is passed in here...
There was a problem hiding this comment.
Okay, I poked aorund and it seems like the right place to define configsets isn't in the ConfigSetService itself, but to pass them in, so I moved it up to NodeConfig. I didn't wire it into solr.xml, just left it as a system variable with defaults.
| ConfigSetAdminResponse.List response = list.process(solrClient); | ||
| Collection<String> actualConfigSets = response.getConfigSets(); | ||
| assertEquals(1, actualConfigSets.size()); // only the _default configset | ||
| assertEquals(Set.of("_default", "_multilingual"), Set.copyOf(actualConfigSets)); |
There was a problem hiding this comment.
-1 don't want multilingual by default
There was a problem hiding this comment.
are you against the concept of multilingual? We already ship multilingual configurations in the _default configset, so this is cleaner (since _default doesn't actually use it)... Plus without this our schema designer, who also assumes multilingual is in _default previosuly, wouldn't work... The -slim distribution doesn't include it.. (Which I guess reminds me I better check that the Schema Designer handles that gracefully)....
There was a problem hiding this comment.
I'm -0 to uploading more than one configset to ZK by default. I wish we had a "dev mode" where we can vary our defaults, such as this. The schema designer is for dev use-case, not prod.
There was a problem hiding this comment.
I suggest raising this matter to the dev list; it deserves broad review.
There was a problem hiding this comment.
I did start a thread... I will follow up. I know lots of folks who manipulate and change schemes in a single environment...
Having said that, I've been looking forward to having distinct defaults that reflect a community consensus of dev, stage, prod for a long itme, but that would be for a seperate body of work!
…hat in NodeConfig Not positivie that the extra change to MiniSolrCloudCluster is worth it.
https://issues.apache.org/jira/browse/SOLR-11033
Description
Move built-in language-specific text analysis out of
_defaultinto a new_multilingualconfigset. New collections using_defaultget general-purpose field types; collections needing types such astext_enor dynamic fields such as*_txt_frcan select_multilingual. Existing ZooKeeper configsets and collections remain unchanged.Even better, you can use teh Schema Designer to pick your languages (driven by the new
_multilingualconfigset and add those fields to your own configset! imagine if we offered lots of sample configsets that you cherry picked to make your configset?also some improvements in schema designer, the big one being the list of languages is now not hardcoded.
Related: #971.
Solution
_multilingual, using the current schemas and dictionaries._multilingual's generic analyzers free of stopword removal and synonym expansion. Stopwords and synonyms use language-specific files underlang/;_defaultkeeps its existing generic resources._multilingualwhen installed locally and absent from ZooKeeper, preserving existing configsets. Follow_default's startup upload path without expanding CoreContainer's filesystem allowlist._multilingualwhile preserving custom source definitions and files. Generic schema editing also works when_multilingualis absent._multilingualschema in ZooKeeper, using Java locale names. Usecsfor Czech field types, dynamic fields, and resources in the new configset._defaultin the slim distribution; include_multilingualand the techproducts configset in the full distribution.Developed with assistance from OpenAI Codex.
Tests
./gradlew tidyand./gradlew check -x testpassed._multilingualconfigset.CreateCollectionTestandZkTest: all 24 tests passed, including creating a_multilingualcollection and indexing and querying French text._default; full contains_default,_multilingual, andsample_techproducts_configs.