Skip to content

Add a collection name prefix in Typesense config #22

@npotier

Description

@npotier

In case this bundle is used by mutliple projects and the same Typesense instance, it would be nice to have a prefix variable that would allow to have distinct collection names.

I had a issue once with two projects (staging and prod) on the same server. I'm thinking of somthing like this:

# config/packages/acseo_typesense.yml
acseo_typesense:
    # Typesense host settings
    typesense:
        host: '%env(resolve:TYPESENSE_URL)%'
        key: '%env(resolve:TYPESENSE_KEY)%'
        collection_prefix: 'my-project-%env(resolve:APP_ENV)%-' #new optional value     

as a result, for example, the collection my-project-dev-books would be created

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions