Problem/Motivation
Config action setupVdbServerWithDefaults uses getDefaultDatabase() method when backend_config => database_settings => database_name value is empty in the recipe input. As Postgres might not be allowed to create databases and the setting actually already exists in module settings, maybe it would be better to re-use it here to avoid setting non-existing database name.
Steps to reproduce
1. Install the module and configure.
2. Try to create search api server with postgres provider and AI backend. Put different non-existing database name in the backed settings.
3. Observe that Server is not able to connect to database, because it doesn't exist.
4. The same is for the config action, if no database_name is selected it tries to use the method getDefaultDatabase() but it actually doesn't exist for the provider class.
Proposed resolution
Implement the method and use the configured database name.
Optionally force the configured database name in Search API Server configuration.
Issue fork ai_vdb_provider_postgres-3594427
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
a.dmitriiev commentedComment #5
marcus_johansson commentedLooks good! Getting merged