*Valid for version Locator 2.9→
Note: be Be sure to use a field that is indexed, the below example requires Lingo/Supervisor. Name must match in all 3 places (bolded). The "name", "suggest.dictionary" and "setting_value" need to be the same value. Person is used in this example. "field" is the name of the indexed Solr field to create suggest on.
Add your new suggester to
solr.config or overridesolrconfig.xml using solrconfig_override.xml (How do override files work?) like this example:
...
Code Block language xml theme Emacs title solrconfig_overrides.xml <add sel="config/searchComponent[@name='real_suggest']">
...
<lst name="suggester">
...
<str name="name"
...
>Person</str> <str name="lookupImpl">FuzzyLookupFactory</
...
str> <str name="dictionaryImpl">HighFrequencyDictionaryFactory</
...
str> <str name="storeDir">suggester_fuzzy_dir_generic</
...
str> <str name="field"
...
>lingo_
...
person</str> <str name="suggestAnalyzerFieldType">phrase_suggest</
...
str> <str name="exactMatchFirst">true</
...
str> <str name="buildOnStartup">true</
...
str> <str name="buildOnCommit">true</
...
</
lst
>
</
add
>
...
str> </lst> </add> <add sel="/config/requestHandler[@name='/real_suggest']/lst[@name='defaults']">
...
<str name="suggest.dictionary"
...
>Person</str> </
...
add>
...
Add the suggester name to index_settings table
...
. The setting is called "SuggestersToGroup" and the value is your suggester name, Postgres insert sql example
...
:
Code Block language sql theme Emacs title Insert SuggestersToGroup to index.index_settings INSERT INTO index.index_setting( index_id, setting_name, setting_value, creation_date_utc, last_modified_date_utc) VALUES ('460f7ec6-8ddd-4654-af5b-8d5b2d72131e
...
', 'SuggestersToGroup', 'Person', now(), now());
You can verify that you are using the correct index_id by running List command of Via.IndexAdmin.exe. If you add more than one suggester the setting_value is comma delimited.
- Upload changes to ZooKeeper. From CMD, run: solr zk upconfig -z localhost:9983 -n ViaWorksCloud -d C:\ProgramData\ayfie\Locator\Solr\configsets\ViaWorksCloud\conf
- Reload the Solr core by browsing to http://localhost:8983/solr/#/~collections/ViaWorksCloud and clicking "Reload".
Grouped suggestions will now appear in the suggestion box after 3 characters are entered under the group heading with the Name used in the configuration.
How to set up custom Lingo fields: How to add custom Lingo fields to Locator