epugh opened a new pull request, #5412:
URL: https://github.com/apache/solr/pull/5412

   Found while testing #5370: open the `films` example in the Schema Designer, 
add Spanish, and the resulting schema has lost more than it gained.
   
   | Step | Removed | Added |
   |---|---|---|
   | Open `films`, click *Proceed* | `_nest_path_`, `_root_` fields | — |
   | Select Spanish, *Update Schema* | `text_general_rev`, `*_txt_rev` | 
`text_es`, `*_txt_es` |
   
   Both bugs are on `main`; neither comes from #5370.
   
   ### Nested docs fields removed on open
   A published configset that the designer has never saved settings for gets 
`enableNestedDocs=false` by default. `getInfo` hands that to the UI, the UI 
sends it back on the first analyze, and the designer deletes `_root_` and 
`_nest_path_`. 
   
   Fix: when opening a published configset with no stored nested-docs setting, 
`SchemaDesignerSettingsDAO.getPublishedSettings` derives it from whether the 
schema has `_nest_path_`. New schemas copied from `_default` keep today's 
default (off).
   
   ### Variant text types treated as languages
   Language sync matched types on the whole suffix after `text_`, against an 
allow-list of `ws`, `general`, `rev`, `sort`. So `text_general_rev` (suffix 
`general_rev`) was removed whenever languages were selected, and 
`text_en_splitting` / `text_en_splitting_tight` were removed even with English 
selected.
   
   Fix: match on the language id before any variant suffix (`languageOf`): 
`general_rev` → `general`, `en_splitting_tight` → `en`. The same rule applies 
to the `*_txt_<lang>` dynamic fields.
   
   ### Tests
   - `TestSchemaDesigner.testOpeningPublishedSchemaKeepsNestedDocsFields`
   - 
`TestSchemaDesignerConfigSetHelper.testLanguageSyncKeepsVariantsOfKeptLanguages`,
 `testLanguageOf`
   
   Both regression tests fail against `main`'s behavior and pass with the fix.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_018RwsEmM9zRWihYjszWDGK9
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to