#!/usr/bin/env bash set -euo pipefail source ./scripts/Unix/starter.sh # Stop the elasticsearch container log_step "Stopping Elasticsearch container..." if ! docker compose stop elasticsearch; then log_warning "Elasticsearch container may not be running" fi log_success "Elasticsearch container stopped!" # Remove the elasticsearch container log_step "Removing Elasticsearch container..." docker compose rm -f elasticsearch || log_warning "Failed to remove Elasticsearch container" log_success "Elasticsearch container removed!" # Remove the es-data volume log_step "Removing Elasticsearch data volume..." docker volume rm -f schon_es-data || log_warning "Failed to remove es-data volume (may not exist)" log_success "Elasticsearch data volume removed!" echo log_result "Elasticsearch has been wiped. Run 'make restart' to recreate and reindex."