Algolia compatibility
App Search is in beta with design partners. Endpoints roll out per tenant.
Each tenant also answers Algolia’s search routes, so an existing Algolia client or InstantSearch front end can search Captain:
These routes read Captain’s copy of the index. They never forward requests to Algolia.
Setup
- Import the Algolia index into Captain under the same index name. See Import from Algolia.
- Point the Algolia client at the tenant host,
acme.captain.dev. - Pass a Captain search key where the client expects the Algolia API key.
The application id can be any value. The hostname selects the tenant.
Point the Algolia client at Captain
The JavaScript client takes the tenant host in hosts. The same client works with InstantSearch.
Multi-query
Each request names an index and its Algolia search parameters. The reply holds one result per request, in Algolia’s format.
curl
Python
TypeScript
Example: (200 OK)
Single-index query
curl
Python
TypeScript
Example: (200 OK)
Insights events
Send clicks and conversions with the queryID from the search result. They feed the same analytics as the native events route.
curl
Python
TypeScript
Example: (200 OK)
Limits
- Supported client versions, headers and parameters are validated per integration before a migration goes live.
- Indexes with per-record access control are not served on these routes. Use the native search routes with scoped keys.
- Facet counts are exact while a query matches up to 250 records. Above that they cover the relevance-cut result set, and the reply says
exhaustiveFacetsCount: false, as Algolia does on large result sets.