replacing opensearch with solr

This commit is contained in:
Stefan Hardegger
2025-09-22 09:44:50 +02:00
parent 9e684a956b
commit 87f37567fb
40 changed files with 2000 additions and 3464 deletions

View File

@@ -39,54 +39,46 @@ storycove:
auth:
password: ${APP_PASSWORD} # REQUIRED: No default password for security
search:
engine: opensearch # OpenSearch is the only search engine
opensearch:
engine: solr # Apache Solr search engine
solr:
# Connection settings
host: ${OPENSEARCH_HOST:localhost}
port: ${OPENSEARCH_PORT:9200}
scheme: ${OPENSEARCH_SCHEME:http}
username: ${OPENSEARCH_USERNAME:}
password: ${OPENSEARCH_PASSWORD:} # Empty when security is disabled
url: ${SOLR_URL:http://solr:8983/solr}
username: ${SOLR_USERNAME:}
password: ${SOLR_PASSWORD:}
# Environment-specific configuration
profile: ${SPRING_PROFILES_ACTIVE:development} # development, staging, production
# Core configuration
cores:
stories: ${SOLR_STORIES_CORE:storycove_stories}
authors: ${SOLR_AUTHORS_CORE:storycove_authors}
# Security settings
security:
ssl-verification: ${OPENSEARCH_SSL_VERIFICATION:false}
trust-all-certificates: ${OPENSEARCH_TRUST_ALL_CERTS:true}
keystore-path: ${OPENSEARCH_KEYSTORE_PATH:}
keystore-password: ${OPENSEARCH_KEYSTORE_PASSWORD:}
truststore-path: ${OPENSEARCH_TRUSTSTORE_PATH:}
truststore-password: ${OPENSEARCH_TRUSTSTORE_PASSWORD:}
# Connection pool settings
# Connection settings
connection:
timeout: ${OPENSEARCH_CONNECTION_TIMEOUT:30000} # 30 seconds
socket-timeout: ${OPENSEARCH_SOCKET_TIMEOUT:60000} # 60 seconds
max-connections-per-route: ${OPENSEARCH_MAX_CONN_PER_ROUTE:10}
max-connections-total: ${OPENSEARCH_MAX_CONN_TOTAL:30}
retry-on-failure: ${OPENSEARCH_RETRY_ON_FAILURE:true}
max-retries: ${OPENSEARCH_MAX_RETRIES:3}
timeout: ${SOLR_CONNECTION_TIMEOUT:30000} # 30 seconds
socket-timeout: ${SOLR_SOCKET_TIMEOUT:60000} # 60 seconds
max-connections-per-route: ${SOLR_MAX_CONN_PER_ROUTE:10}
max-connections-total: ${SOLR_MAX_CONN_TOTAL:30}
retry-on-failure: ${SOLR_RETRY_ON_FAILURE:true}
max-retries: ${SOLR_MAX_RETRIES:3}
# Index settings
indices:
default-shards: ${OPENSEARCH_DEFAULT_SHARDS:1}
default-replicas: ${OPENSEARCH_DEFAULT_REPLICAS:0}
refresh-interval: ${OPENSEARCH_REFRESH_INTERVAL:1s}
# Query settings
query:
default-rows: ${SOLR_DEFAULT_ROWS:10}
max-rows: ${SOLR_MAX_ROWS:1000}
default-operator: ${SOLR_DEFAULT_OPERATOR:AND}
highlight: ${SOLR_ENABLE_HIGHLIGHT:true}
facets: ${SOLR_ENABLE_FACETS:true}
# Bulk operations
bulk:
actions: ${OPENSEARCH_BULK_ACTIONS:1000}
size: ${OPENSEARCH_BULK_SIZE:5242880} # 5MB
timeout: ${OPENSEARCH_BULK_TIMEOUT:10000} # 10 seconds
concurrent-requests: ${OPENSEARCH_BULK_CONCURRENT:1}
# Commit settings
commit:
soft-commit: ${SOLR_SOFT_COMMIT:true}
commit-within: ${SOLR_COMMIT_WITHIN:1000} # 1 second
wait-searcher: ${SOLR_WAIT_SEARCHER:false}
# Health and monitoring
health:
check-interval: ${OPENSEARCH_HEALTH_CHECK_INTERVAL:30000} # 30 seconds
slow-query-threshold: ${OPENSEARCH_SLOW_QUERY_THRESHOLD:5000} # 5 seconds
enable-metrics: ${OPENSEARCH_ENABLE_METRICS:true}
check-interval: ${SOLR_HEALTH_CHECK_INTERVAL:30000} # 30 seconds
slow-query-threshold: ${SOLR_SLOW_QUERY_THRESHOLD:5000} # 5 seconds
enable-metrics: ${SOLR_ENABLE_METRICS:true}
images:
storage-path: ${IMAGE_STORAGE_PATH:/app/images}
@@ -100,8 +92,8 @@ management:
show-details: when-authorized
show-components: always
health:
opensearch:
enabled: ${OPENSEARCH_HEALTH_ENABLED:true}
solr:
enabled: ${SOLR_HEALTH_ENABLED:true}
logging:
level: