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}/aliases to 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 aliases and 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.

Command icon 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

lussoluca created an issue. See original summary.

lussoluca’s picture

Status: Active » Needs review

Implemented 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.

lussoluca’s picture

Status: Needs review » Fixed

Committed and released in version 1.2.0-beta2

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.