*Valid for version Locator 2.9→
Note: be sure to use a field that is indexed, the below example requires Lingo/Supervisor. Name must match in all 3 places (bolded)
- Add your new suggester to solr.config or override like this example:
<
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</
str
>
</
lst
>
</
add
>
<
add
sel
=
"/config/requestHandler[@name='/real_suggest']/lst[@name='defaults']"
>
<
str
name
=
"suggest.dictionary"
>Person</
str
>
</
add
>
2. Add the suggester name to index_settings table:
The setting is called "SuggestersToGroup" and the value is your suggester name, example
22;"460f7ec6-8ddd-4654-af5b-8d5b2d72131e";"SuggestersToGroup";"Person";"2018-05-16 09:02:06.184858";"2018-05-16 09:02:09.322259"
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.