Corteza Discovery
Corteza Discovery provides a powerful search engine to interact with your data. Corteza Discovery defines an intuitive interface to search and, in some cases, visualizes the data such as geographical metadata.
|
Refer to Multi-image Discovery with PostgreSQL for an example. |
Configuring Corteza Server
To enable Corteza Discovery, access the Docker container and run the following commands:
corteza-server settings set discovery.compose-namespaces.enabled true
corteza-server settings set discovery.compose-modules.enabled true
corteza-server settings set discovery.compose-records.enabled true
corteza-server settings set discovery.system-users.enabled true
.env variables for your Corteza server:DISCOVERY_ENABLED=true
DISCOVERY_BASE_URL=your-discovery-server-base-url
# Optional variable for debugging
# DISCOVERY_DEBUG=true
|
For an example of an online deployment, refer to Multi-image Discovery with PostgreSQL. |
|
To access the Docker container, run the following command:
|
Configuring Corteza Discovery Server
Search Engine Requirements
Discovery requires a running instance of either Elasticsearch or OpenSearch to function.
|
Important: You will notice the configuration variables below use the |
Generating Auth Clients
Before configuring your environment variables, you must generate Auth Clients within Corteza to securely connect the Discovery Indexer and Searcher to the main server.
-
Log into the Corteza Admin Area.
-
Navigate to System > Auth Clients.
-
Click New to create a client (e.g., name it "Discovery Indexer - Private").
-
Ensure the Grant Type is set to allow
client_credentials. -
Select a specific role that has the necessary read permissions for the data you wish to index.
-
Click Submit.
-
Securely copy the generated Client ID (used for the Key) and Client Secret.
-
Repeat this process for your Protected Indexer, Public Indexer, and Searcher.
Environment Variables
Setup the following .env variables, replacing the placeholder values with your search engine details and newly generated Auth Client credentials:
ES_ADDRESS=your-open-search-url
ES_USERNAME=your-open-search-username
ES_PASSWORD=your-open-search-password
# Set to true if connecting over HTTPS
ES_SECURE=false
# Re-indexing interval in seconds
ES_INDEX_INTERVAL=60
CORTEZA_SERVER_BASE_URL=your-corteza-server-url
CORTEZA_SERVER_AUTH_URL=your-corteza-server-url/auth
DISCOVERY_INDEXER_ENABLED=true
DISCOVERY_SEARCHER_ENABLED=true
# Private indexer — indexes data visible only to the owning user
DISCOVERY_INDEXER_PRIVATE_INDEX_CLIENT_KEY=private-index-client-key
DISCOVERY_INDEXER_PRIVATE_INDEX_CLIENT_SECRET=private-index-client-secret
# Protected indexer — indexes data visible to authenticated users
DISCOVERY_INDEXER_PROTECTED_INDEX_CLIENT_KEY=protected-index-client-key
DISCOVERY_INDEXER_PROTECTED_INDEX_CLIENT_SECRET=protected-index-client-secret
# Public indexer — indexes data visible to everyone
DISCOVERY_INDEXER_PUBLIC_INDEX_CLIENT_KEY=public-index-client-key
DISCOVERY_INDEXER_PUBLIC_INDEX_CLIENT_SECRET=public-index-client-secret
# Searcher — used by the Discovery search interface
DISCOVERY_SEARCHER_CLIENT_KEY=your-searcher-client-key
DISCOVERY_SEARCHER_CLIENT_SECRET=your-searcher-client-secret