Onto-Med / top-backend

Spring Boot based backend of the TOP Framework
MIT License
0 stars 1 forks source link

Env vars DB_NEO4J_HOST and DB_ELASTIC_HOST have no effect #187

Closed ChristophB closed 9 months ago

ChristophB commented 11 months ago

Looks like Neo4J and Elasticsearch related configuration was restructured in c33081064d4f7b94a571ff2fb8ad23ea6a98dbe8. Now they are completely gone from application.yml and the backend always tries to connect to localhost regardless of what the env vars are set to.

image

fmatthies commented 11 months ago

This is intended: for all the document related stuff one needs a proper configured adapter

top:
  [...]
  documents:
    data-source-config-dir: ${DOCUMENT_DATA_SOURCE_CONFIG_DIR:config/data_sources/nlp}
    default_adapter: ${DOCUMENT_DEFAULT_ADAPTER:#{null}}

if no adapter is given (either it's specified by name or the the first found under data-source-config-dir) connections default to services default

ChristophB commented 11 months ago

So what does it mean if there is no adaptor configuration given? Should the backend in such cases refuse to execute any queries and return an empty set of concepts? Currently, it tries to connect to localhost and fails because nothing is listening there.

fmatthies commented 11 months ago

If no adapter config is given, default connection values are used (I specified this in an updated README in the add-conceptCluster-creation-functionality branch). The problem with refusing to execute any queries is, that I didn't find any information for spring to handle missing connections on start up for neo4j or elasticsearch.

ChristophB commented 9 months ago

README.md has been updated with the necessary information to configure an adapter.