There is a fundamental difference between what Google Search Appliance (GSA) provides for auto-suggestions, which is based on user-entered queries, versus SearchBlox, which uses content-based auto-suggestions.
Both approaches have their pros and cons. Unless you enter the query you will not see it suggested in GSA, but in SearchBlox this is created from the content indexed from your pages. This means there will be a lot more suggestions coming from SearchBlox, since there is more text available, rather than the top 1000 queries or so being used for suggestions in GSA.
From 8.6.4 onwards, suggestions from previous queries can be retrieved with AutoSuggest servlet using the collection name searchlogs as shown here
where the collection name searchlogs represents the collection with previous queries.
To import the search queries, use a CSV collection and CSV file for the query suggestion service. (See here for more information: https://developer.searchblox.com/docs/csv-collection). The CSV option is easier to maintain and can be set up for periodic updates. With the query suggestion service, you have complete control over what is suggested for the users.
Then you can call the specific collection for auto-suggestions (http://localhost:8080/searchblox/servlet/AutoSuggest?q=hello&col=1&limit=10). The collection ID will be CSV collection, which contains the search queries from GSA.
You can either create a CSV file with possible query suggestions, or generate a CSV file based on the past queries from SearchBlox.
Option 1: Create a CSV file with the list of possible words. Enter the column name or field name for the queries as querystring. Here you can have control on what is suggested to the user.
Option 2: Generate a CSV file based on the past queries made by users in SearchBlox.
- Access the following URL to get the queries in CSV format from your Chrome browser.
[http://localhost:9200/_sql?format=csv&sql=select querystring from querylogs](http://localhost:9200/_sql?format=csv&sql=select querystring from query logs)
Save as CSV file.
The preceding URL will only work with valid SearchBlox license.
Create a CSV collection and enter the file path where the CSV file is stored. The file has to be available in the same server or machine where SearchBlox is running.
Then enter the ID as querystring as in the following screenshot:
Please refer to https://developer.searchblox.com/docs/csv-collection for more about working with CSV collections.
After indexing, you can access the autosuggest servlet using the following URL. You must manually stop indexing for CSV collections, since the indexing is continuous by default.
Partial query for which the suggestions are displayed.
The maximum number of results that the Auto-suggest servlet should return.
Updated almost 2 years ago