Problem/Motivation
The module currently works only with direct collection names. Site owners may not want to expose internal collection names to clients (for example in search UIs or scoped API keys). Typesense provides collection aliases: virtual collection names that point to real collections and can be used in search requests in place of the real name.
Proposed resolution
Add alias management support:
- New methods on
TypesenseClientInterface/TypesenseClient:upsertAlias(),retrieveAlias(),retrieveAliases(),deleteAlias(). - New server-level configuration form at
/admin/config/search/search-api/server/{server}/aliasesto add, edit and delete aliases, with a table of existing aliases. - Validation that prevents creating an alias with the same name as an existing collection.
- New permission
administer search_api_typesense aliasesand a new "Aliases" local task on the server page.
User interface changes
New "Aliases" tab on the Search API server page for servers using the Typesense backend.
API changes
Four new methods added to TypesenseClientInterface.
Data model changes
None. Aliases are stored on the Typesense server, not in Drupal configuration.
Issue fork search_api_typesense-3611363
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
lussolucaImplemented in MR !76: new client alias methods, server-level Aliases configuration form (add/edit/delete with validation), routes, local task, permission and README documentation. Verified end-to-end on a local DDEV site against Typesense 28.0.
Comment #4
lussolucaCommitted and released in version 1.2.0-beta2