Set Paligo to use Algolia Search
To use Algolia search for your HTML5 outputs, you need to connect Paligo to Algolia, enable the Algolia search, and then configure the index in Algolia.
Connect Paligo to Algolia
To connect Paligo to Algolia:
-
If you do not already have an Algolia account, set one up at https://www.algolia.com.
-
Sign in to Paligo using a user account that has administrator permissions.
-
Select the avatar in the top-right corner.
-
Select Settings from the menu.
-
Select the Integrations tab.
-
Find Algolia and select the Add button (or Change if you are editing an existing Paligo-Algolia integration).
-
In a different browser tab or window, log in to your Algolia account and find the Application ID and API Key (Search Only Key). For information on how to find these API Key settings, see the official Algolia documentation.
Note
Do not use the Admin API Key. That key should always be kept secret.
-
In Algolia, copy the Application ID and then paste it into the Application ID field in Paligo.
-
In Algolia, copy the API Key (Search Only Key) and then paste it into the Search Only API Key field in Paligo.
If you are not using DocSearch, continue with the next step.
If you are using DocSearch rather than the licensed Algolia search, select Save and ignore the remaining steps in this procedure.
-
In Algolia, create a new API key. In its ACL field, add the operations addObject and deleteObject.
For details on creating a new API key, see the official Algolia documentation.
-
In Algolia, copy the new API key and then paste it into the Index API Key field in Paligo.
-
Select Save.
Enable Algolia Search
When have connected Paligo to Algolia , the next step is to set up Algolia search in your HTML5 layout. There are several Algolia-related settings, some of which are optional, depending on whether you want to use Algolia's faceted search feature.
Tip
For more details on this feature, see Delay Search Results as Users Type Query.
-
Select Layout in the top menu.
-
Select the Layout you want to update or Create a Layout.
Tip
You can copy the URL of the Layout Editor and paste it into a new tab in your browser. This can be useful if you frequently switch between your Paligo content and the Layout settings.
-
Select Search Engine in the sidebar.
-
Choose whether the layout should Use Algolia Search.
-
Enable - Sets Paligo to use the Algolia search engine for publications made using this layout.
-
Disable - Sets Paligo to use its own built-in search engine. The Algolia search engine is not used.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Set the Use Algolia DocSearch option status.
-
Enable - Choose this option if your organization has been accepted into the Algolia DocSearch program. Algolia DocSearch is a special type of Algolia account that you have to apply for.
-
Disable - Choose this option if your organization is not using Algolia DocSearch.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
If you want the Algolia index to have a specific name, enter the name in the Use custom index name for Algolia Search field. This only works when publishing publications in a single language. Leave the field clear to set Paligo to create indexes based on the publication IDs.
For more details, see Custom Index Name for Algolia Search.
-
Choose whether you want Paligo Create separate search page for Algolia.
-
Enable - Choose Enable if you want your output to use Algolia's faceted search.
-
Disable - Choose Disable if you do not want your output to use Algolia's faceted search.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Use Delayed search for Algolia to control what happens when a user starts typing in a search query.
Tip
You can change the character limit by using JavaScript. For example, the following script changes the limit to 7:
var instantsearch_minlength = 7;
To add the script, use a code editor or text editor to create the script and save the file with a
.js
extension. Then upload the script as a custom JS script in your HTML5 Help Center layout, see Upload Customized JavaScript.-
Enable - Algolia will only start providing search results when the user has entered three characters in the search field. If you have set your output to use a separate search page for Algolia, the user has to press Enter to get results on that page.
-
Disable - Algolia will start providing results as soon as the user enters a character in the search field.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Set Use breadcrumbs path in Algolia search results to:
-
Enable - To show the breadcrumb for a search result when you hover the cursor over the result. The breadcrumb shows where the search result topic appears in the hierarchy.
If you use the Advanced Search option (below the main search field), the breadcrumb is shown as text below each search result.
-
Disable - To prevent the breadcrumb from appearing.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
Choose whether you want Paligo to Output taxonomies as facets for Algolia Search page:
-
Enable - Choose Enable if you want your output to use Algolia's faceted search.
-
Disable - Choose Disable if you do not want your output to use Algolia's faceted search.
-
Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.
-
-
If you want your output to use Algolia faceted search, you will need to set up taxonomies for each "facet". You need to enter the taxonomy names in one of the following fields:
-
Taxonomies to use for flat Algolia facets - Enter the name of each taxonomy that you want to use in a "flat" faceted search.
-
Taxonomies to use for hierarchical Algolia facets - Enter the name of the taxonomy that you want to use in a "hierarchical" faceted search.
In both cases, use a semi-colon to separate each taxonomy name, for example: brand;product;color. For details, see Set Up Algolia Faceted Search.
If you do not want Paligo to use faceted search, clear the fields.
-
-
Select Save.
Having Use Algolia Search set to Enable is the only requirement (in the Layout) for connecting Paligo to Algolia. If you intend to set up Algolia faceted search, you will need to change some of the other settings too, as described in Set Up Algolia Faceted Search. The other Algolia-related settings are optional.
Configure the Index in Algolia
To perform a search, Algolia needs an index. The index contains information about the content that Algolia should search for results.
The following steps explain how to create and edit the index. For this, we assume that you have already set up: and an HTML5 help center layout
-
An HTML5 help center layout so that Algolia is enabled.
-
In Paligo, use an HTML5 help center layout (that has Algolia enabled) to publish a publication (see Publish Content. When Paligo completes the publishing process, it uploads a JSON file to Algolia and creates an index.
To learn how to enable Algolia in an HTML5 help center layout, see Enable Algolia Search.
Note
You must use a publication that contains content. If there are topics that only contain a title, the JSON will be incorrect. If you are testing, you could use topics with just a title and a single paragraph that contains text.
-
In Algolia, select your application and look at the Index section. It lists each index that has been created for your application.
By default, Paligo creates an index for each language that you publish. Each index name consists of a language code prefix and the UUID of the publication. For example:
en-UUID-817f5a19-d0db-0059-32e9-a958b958b9f85e62
Note
If your HTML5 layout is set to use a text name instead of the publication ID, the index will have that name. For details, see Custom Index Name for Algolia Search.
-
Select the link for the index for the publication you published.
Tip
To find the UUID of the publication in Paligo, select the dotted menu ( ... ) for the publication and then select Edit and then Open Structure. The UUID is shown in the publication's metadata.
-
Select the Configuration tab.
-
In the SEARCH BEHAVIOR section, select Deduplication and Grouping.
-
Configure these settings:
-
Distinct
Set this to True.
-
Attribute for Distinct
Set this to either title or url.
-
-
In the RELEVANCE ESSENTIALS section, select Searchable Attributes.
-
Add searchable attributes for:
-
title
-
body
-
-
Set title and body to be ordered and then drag them into the order you want, where the top attribute in the list is most important. Typically, users set title as the top attribute.
-
If you published in multiple languages, repeat this procedure for the indexes Paligo created for the other languages.
Note
You only need to configure an index once. When you next publish the same publication, Paligo will update the index without changing the configuration you have in place.
Your HTML5 help center output should now be set up to use Algolia search. To learn how to test it, see Test your Algolia Search.