Issue
Attempts to save a Solr stemming dictionary (stemdict.txt) file using the Fusion UI fail with an HTTP 400 Bad Request error. This issue is often encountered when adding new entries that appear to be correctly formatted.
Diagnosis
This error can occur when the file contents use spaces instead of tab characters to separate terms in the stemdict.txt file. Fusion's UI requires tab-separated entries for stem dictionary configuration files. Some text editors replace tab characters with spaces, which leads to invalid file format submission and a resulting HTTP 400 error.
The error message may include:
HTTP Status Code: 400
Message: Could not map JSON to Java object
Details: Could not load conf for core <core-name>: Can't load schema null: Index 1 out of bounds for length 1Environment
Fusion 5.7.1 and above
Solr 8.11.1 and above
Cause
The stem dictionary file (stemdict.txt) must contain tab-separated key-value entries. For example:
condor condor
condors condorIf entries use space characters instead of tabs, Fusion’s UI will fail to parse the file and return a 400 Bad Request error when attempting to save it.
Fusion’s UI text editor may not preserve tab characters depending on the browser or operating system clipboard behavior. Similarly, some code editors like Visual Studio Code or browser-based editors may silently convert tabs to spaces.
Resolution
Use a plain-text editor that preserves tab characters
To ensure valid formatting:
Use a plain-text editor such as Notepad (Windows) or TextEdit (macOS in plain text mode).
Enter stem dictionary entries using the Tab key, not the Spacebar.
Save the file with a
.txtextension.
Example of correct formatting:
condors[TAB]condorWhere [TAB] is a literal tab character.
Option 1: Update the file using the Fusion UI
In Fusion, go to System > Solr Config.
Navigate to the relevant Solr collection and open the subdirectory (e.g.,
lang) containingstemdict.txt.Open
stemdict.txtfor editing.Paste in the updated content with tab-separated entries.
Click Save.
Note: The Fusion UI may not correctly render or preserve tab characters typed directly into the editor. It is recommended to paste pre-edited content from a plain-text editor.
Option 2: Update the file using the Solr Config API
You can upload the updated file directly using the following curl command:
curl -u <username>:<password> -X PUT -H 'Content-type: text/plain' \
--data-binary '@stemdict.txt' \
"https://<fusion-host>/api/collections/<collection-name>/solr-config/lang/stemdict.txt?reload=true"Replace:
<username>:<password>with appropriate credentials<fusion-host>with your Fusion host URL<collection-name>with the name of your Solr collection
This command uploads the new file and reloads the configuration.
Note: When using a terminal-based editor such as VIM or nano, ensure that tab characters are preserved before uploading.