Swiftype Search
Swiftype search, also known as Elastic search is a third-party search engine that you can use with your Paligo publications. It provides a fast, highly customizable search that can find answers from many different websites.
Swiftype search, also known as Elastic search, is a third-party search engine that you can use with your Paligo publications. It provides a fast, highly customizable search that is designed for a wide range of business websites, including e-commerce sites. As a dedicated search engine, it has some benefits over Paligo's built-in search engine, but it does require a Swiftype subscription.
The main benefits of Swiftype search are:
-
Extremely fast, even on large amounts of content
-
Provides more control over how the search works and how results are ranked
-
Supports federated search, where the search engine can look for results in multiple locations.
Typically, you will have several different publications that you want to publish independently, and a portal page with a search. By using Swiftype, you can set the portal search so that it looks for content in all of the publications (and perhaps search your website and other locations too).
Note
Swiftype renders breadcrumbs within the body text of the search results. These are not possible to hide with Paligo settings since Swiftype does not index content or attribute changes made to a webpage via JavaScript.
To resolve this, you have to do some post processing of the HTML files, either manually or writing a script that adds the data-swiftype-index='false'
attribute to the element you want to hide from being searched.
Tip
Swiftype only searches content that is published to a web server without authentication. It needs access to your web site and it "pulls" index data. If you prefer a search service where the index data is "pushed" see Algolia Search Engine Integration.
To use Swiftype search with your Paligo content, you need:
-
Swiftype account
-
Basic knowledge of how to use Swiftype
-
HTML5 layout, such as an HTML5 Help Center layout
-
Paligo content that is published to a web server, so that it has a URL that can be "crawled" by the Swiftype search engine.
If you have these, you can Connect Paligo to Swiftype.
To use Swiftype as the search engine for your Paligo content, you need to have the prerequisites in place. You can then set up:
-
Paligo publications to use Swiftype for the search engine
-
Swiftype to index your Paligo publications and any other domains you want to include in the search results.
To apply the settings, you will need to use both Swiftype and Paligo, so it is a good idea to have them both open at the same time.
Note
The steps described in Swiftype are accurate at the time of writing. There may be differences if the Swiftype user interface changes.
-
In Swiftype, create a new engine.
-
Enter the URL for the new engine and then verify it. This is the URL where your main search page will be hosted, for example, the URL of your main portal page.
-
Enter a name for the engine and choose the languages you want it to support, and then create the engine.
-
-
Select Complete Setup. Swiftype will start crawling your site. You do not need to wait for it to finish crawling.
-
Go to the <Install Search> settings and look at the script Swiftype provides. The on-screen instructions tell you to copy the entire script to your web site, but ignore that for your Paligo content (you will need to add the script to any other sites you include in your search though).
Instead, look for the key that is in the script. It is a series of characters in the last line of the script (before the closing </script>). For example, in the following sample, the key is:
vb9gHTohoo7zFvm4vsSd
-
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.
-
Enter your Swiftype key in the Use Elastic Site Search field. This is the key from the Swiftype script as described in step 3. It is not the same as the API key or Engine key that are also available in Swiftype.
-
Enable the Elastic site search, only index topic content setting. This will limit Swiftype so that it only searches in the content of your topics, and not any other parts of the page, such as the header or footer. If you prefer, you can disable this setting, but then you may get results that are only matches due to terms in your header, footer, table of contents, etc.
-
Select Save.
-
In Swiftype, go to the <Install Search> settings and select Change Configuration and then access the Search Field settings.
-
Select:
-
Yes, my site has an input field
-
I am unable to add this class
-
-
Set the Identifier type to class name and enter the CSS class for your portal page's search field as the Class name. For the default HTML5 Help Center, the search field class is:
.search-field
-
Go to the Domains settings. Add a domain for each different website that you want the search engine to use. For example, if you publish a user guide and a developer guide as separate publications on different domains, you will need to add a domain for each guide.
-
Save your Swiftype settings.
-
In Paligo, publish your content using the layout that you edited in step 4 (see About Publishing).
When the output is created, a zip file is downloaded in your browser. Unzip the file and upload the "out" folder and its contents to your web server and make sure it replaces the existing content on your server. If you are unsure how to do this, please ask your web server admin.
Note
If you want Swiftype to return results from several publications, make sure you publish them with layouts that all use the same Swiftype key. For example, if you have three help center publications and an API help publication, you could use a HTML5 help center layout and an HTML5 API layout. Both of the layouts need to be set up to use the same Swiftype key.
For other types of content that will be included in the search, such as your website, you need to add the Swiftype script (which includes the key) to your website as explained in the Swiftype documentation.
-
In Swiftytpe, select <Install Search> and then Resume Configuration. At the bottom of the Install Site Search page, select Activate Site Search. Swiftype will crawl your site. When it is finished, the search fields in your Paligo content will use the Swiftype search. It will provide results from every domain you have included in the Domains settings in Swiftype.
To test it, select the search icon at the end of the search field on the portal page. It should display a popup dialog that shows a list of results - this dialog is provided by Swiftype (and can be styled in Swiftype).
You can use Swiftype to provide federated search in your Paligo HTML5 Help Center outputs. With federated search, you can set the search on your Help Center to get results from many different Help Centers or web sites, depending on your requirements.
To learn more about federated search, see Federated Search.
To learn how to set up Swiftype federated search, see Connect Paligo to Swiftype.