Configure the Suggest Component
-
Choose a suggester implementation from the Solr Suggester documentation, and define it in the solrconfig.xml file.
You can edit the solrconfig.xml file inside of the Managed Fusion Admin UI. Navigate to System > Solr Config, and select the solrconfig.xml file to begin.
In this example, create a suggester called mySuggester in solrconfig.xml using the
AnalyzingInfixLookupFactory
. Definedescription
as the suggester’s target field:<searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">mySuggester</str> <str name="lookupImpl">AnalyzingInfixLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">description</str> <str name="suggestAnalyzerFieldType">string</str> <str name="buildOnStartup">false</str> </lst> </searchComponent>
-
Ensure that the field used for autosuggest is correctly defined in the schema:
<field name="description" type="text_general" stored="true" indexed="true" multivalued="false" />
-
Once modified, submit a request at Lucidworks support and ask them to upload the custom configuration files to ZooKeeper using ZooKeeper’s command line interface.
Use the zkcli command
putfile
to replace an existing ZooKeeper configuration file. Typically,CONFIG_NAME
will likely represent the name of the collection. Alternatively, the name represents a custom configuration.https://EXAMPLE_COMPANY.b.lucidworks.cloud:6764/apps/solr-dist/server/scripts/cloud-scripts/zkcli.sh -z localhost:2181 -cmd putfile /configs/CONFIG_NAME/solrconfig.xml /Desktop/solrconfig.xml
-
To enable autosuggest in Managed Fusion, add the
suggest
request handler to the allowed request handlers in the Solr Query stage of the query pipeline.Build the suggester using
…/suggest?suggest.build=true
. For example:https://EXAMPLE_COMPANY.b.lucidworks.cloud:6764/api/query-pipelines/PIPELINE/collections/COLLECTION_NAME/suggest?suggest.build=true
-
Start searching!
https://EXAMPLE_COMPANY.b.lucidworks.cloud:6764/api/query-pipelines/PIPELINE/collections/COLLECTION_NAME/suggest?suggest.q=ca...