Edit a file
You edit the configuration files of your Opensolr Index right in the browser. Saving a file reloads the index, so the change is live at once.
01 · Edit and save
- Open the control panel of the index and click Configuration.
- Under Edit Config File, pick a file in the list. The editor opens full screen, with colours for XML, HTML, JavaScript and CSS, and shows “File Load OK”.
- Make your change.
- Save with the disk icon (Save File) at the top, or with Ctrl+S (Cmd+S on a Mac).
- Read the message at the top: “File saved”, or “ERROR - click for details”, which opens the error log.
- Close the editor with the x icon. Save first: closing does not save.
The warning icon next to Save opens the error log of the index at any time.
02 · When a save shows an error
The file was written, but the index could not load it, most often because of a typo in the XML. Read the error, fix the file and save again. Reload makes the index read its files once more.
03 · Create a new file
- Click the + next to the file list.
- Type the File name (no extension).
- Pick the extension:
.txt,.xml,.affor.dicfor Solr files,.vm,.jsor.cssfor Velocity files. - Click Create File. The empty file joins the list, ready to edit.
To delete a file, use the API: API: Delete configuration file.
04 · What Opensolr adjusts when you save
- A
<dataDir>setting is removed andlocalhostor127.0.0.1addresses are replaced: Opensolr decides where the data lives and how servers reach each other. - In XML files,
buildOnCommitandbuildOnOptimizeset to true are turned to false, so suggesters are not rebuilt on every commit. - Very large files are refused with “ERROR: File too large.”
Many files at once: Upload a ZIP. One file from your own code: API: Upload or update your configuration files.