-
Notifications
You must be signed in to change notification settings - Fork 1
Algolia
The portal uses Algolia's search as a service solution for its search functionality. When a user searches for a term on the portal, the website communicates directly with Algolia.
This page describes all the nuances of integrating data, that originates in Kentico Kontent with Algolia's own specific data representation. Here are some links that describe the basics:
- The search bar - point of entry for the users.
- Formatting and structuring the data
- Configuration
- The Search workflow
In general, Algolia only needs data that can help people find what they need. Basically, these are the only necessary types of data from Kentico Kontent that will be indexed on Algolia's servers:
- Searchable data - descriptive content that the users are searching for.
- Data to filter records - metadata for both managing the index itself and sorting the search results.
- Data to show in the results - for example, a title of an article.
The workflow of managing the index on Algolia consists of the following 3 steps:
- Fetch data from your data source - Handled by Reference Preprocessor and Tutorial Search.
- Transform your extracted data - Handled by Reference Search and Tutorial Search.
- Push your records to an Algolia Index - Handled by the Index Sync service.
According to the Algolia's best practices, keeping record size small is crucial, not only because of the record size limit. Having blocks of text split into multiple records with small pieces of information vastly improves search relevance and provides opportunities for further optimization of the search experience. Therefore, both services are responsible for creating records for indexing, had to find a way to split potentially large blocks of text into smaller records.
{
"content": "Because your application doesn't require any server-side code, you can host it as a collection of static files for free on Surge, Github pages, or a similar service. ...",
"id": "<GUID>",
"title": "Building your first React app",
"heading": "Build and deploy",
"codename": "building_your_first_react_app",
"order": 32,
"platforms": [
"react"
],
"section": "tutorials",
"objectID": "building_your_first_react_app_32"
}
{
"content": "Create a new content item based on a specific content type. ...",
"title": "Content management API v2",
"heading": "Add a content item",
"codename": "add_item",
"section": "API",
"id": "<GUID>",
"objectID": "add_item"
}
In order to have the Index Sync service and the Search box on the website work correctly, one has to set up the index within the Algolia UI accordingly:
- Searchable attributes: title, heading, content (in this order starting with the most relevant)
- Ranking and Sorting: order as a custom ranking attribute (ascending)
- Attributes for faceting: codename, id, section (as not searchable)
- Deduplication and Grouping: codename as an attribute for distinct
- Overview
- Website
- Dispatcher
- Notifier
- Search Functionality
- GitHub Integration
- Bulk Publishing / Scheduling to Publish
- API Reference
- Integration Tests
- Content Models