Algolia
Hosted search over an index of records: attributes, ranking and facets. When it fits and when the database is enough.
IntegrationsUsing since 2022 · Featured project: CAS Marketplace (in the Code & Pepper team)
- Category
- Integrations
- Using since
- 2022
- Featured project
- CAS Marketplacein the Code & Pepper team
In practice
I pick Algolia when someone has to find a record in a catalogue or a dashboard by typing a few letters. It is in the stack of the Code & Pepper team projects Gaia Lens and CAS Marketplace. When a filter on a few fields is enough, I stay with the database.
What is Algolia?
Algolia is a hosted search platform with an API. Data goes in as JSON records in an index, and the index settings decide how records are matched and ranked. The application sends queries through the API or ready-made UI libraries. Algolia also offers vector and hybrid retrieval, but this entry covers the index and ranking side. Answers built from documents belong to the entry on RAG.
The index is a copy of the data prepared for searching, not its source. You send records from your own application with an API client or a connector. Every attribute is searchable by default, so I usually narrow that to the name and description and keep URLs out of the search. Typos are tolerated out of the box, and attributes declared as facets give categories with counts for filtering the results.
- Kind
- A hosted search platform
- Data
- JSON records in an index
How I work with Algolia
I start with what the user types and what they should get after the first letters, and only then touch the settings. The index is a copy, so first I settle where the records come from and who refreshes them.
Records from one source
One record is one thing the user should find: a product, a document, a client. I send them from the application and hook the refresh to the moment data changes, so the index does not go stale quietly. I rolled out Algolia search on Gaia Lens, in the Code & Pepper team.
Attributes and ranking
I choose which attributes are searched, usually the name and description, and keep display-only fields such as an image URL out. Ties I break with a business attribute such as popularity or date, because custom ranking decides only when the earlier criteria have not picked a winner.
The interface and control queries
I assemble the interface from ready InstantSearch widgets and style them with CSS. Before hand-over I write down queries that must return a given record and run them after every settings change.
When it fits, and when it doesn't
A hosted search fits where searching is the main thing the user does.
A good fit when
- A catalogue of products or listings where users filter by category and see counts.
- A dashboard with thousands of records where the result should show as you type.
- A team that would rather tune ranking in a panel than run a search engine itself.
Not a fit when
- A few hundred records that a filter in the database can handle.
- Data that must not leave your own infrastructure.
- Natural-language questions over long documents that need an answer, not a list.
When search should answer questions from documents instead of returning a list, I reach for RAG, and the scope of such work is described on the AI integration page.
Frequently asked questions
Should users find things in your data?
Write what should be searched, how many records there are and where they come from. I will answer whether a filter in the database is enough or a separate index is needed.