LindormSearch lets you extend the IK analyzer with your own vocabulary by uploading custom dictionary files to a configuration set. Use this to improve tokenization for domain-specific terms — product names, brand keywords, or industry jargon — that the default dictionary doesn't recognize.
Two dictionary files are available:
| File | Purpose |
|---|---|
extra_main.dic | Adds words to the main dictionary so the IK analyzer recognizes them as discrete tokens |
extra_stopword.dic | Adds words to the stopword list so they are filtered out during analysis |
Each file uses the same format: one word per line.
Prerequisites
Before you begin, make sure you have:
Java Development Kit (JDK) V1.8 or later installed
LindormSearch version 8.10.5 or later. To check and upgrade, see Release notes of LindormSearch and Upgrade the minor engine version of a Lindorm instance
A client connected to LindormSearch via Search Shell. See Use Search Shell to connect to and use LindormSearch
Limitations
Only the IK analyzer supports custom dictionaries. Specify the analyzer when creating a search index. See CREATE SEARCH INDEX.
Configure a custom dictionary
Custom dictionaries are bundled inside a configuration set. The general workflow is: download the configuration set, edit the dictionary files locally, then upload and reload.
Go to the
lindorm-search-cli/bindirectory:cd lindorm-search-cli/binList available configuration sets:
./search-cli zk ls /configsDownload the configuration set you want to modify. This creates a
confdirectory in the current path:./search-cli zk downconfig -d . -n <configuration set name>For example:
./search-cli zk downconfig -d . -n default.myTable.myIdxGo to the
confdirectory:cd confIf
extra_main.dicdoes not exist, create it:touch extra_main.dicEdit the main dictionary file. Each line must contain exactly one word:
vi extra_main.dicExample content:
Guide Product EngineEdit the stopword list file. The default filename is
extra_stopword.dic:vi extra_stopword.dicReturn to the
bindirectory:cd ..Upload the modified configuration set:
./search-cli zk upconfig -d conf -n default.myTable.myIdxReload the collection to apply the changes:
./search-cli reload_collection -c default.myTable.myIdx