#!/usr/bin/env bash # # Convenience script to rebuild suggestion index for a tenant. # # Usage: # ./scripts/build_suggestions.sh [--days 30] [--batch-size 500] [--min-query-len 1] [--es-host http://localhost:9200] # set -euo pipefail if [ $# -lt 1 ]; then echo "Usage: $0 [extra args...]" echo "Example: $0 162 --days 30 --recreate" exit 1 fi TENANT_ID="$1" shift || true ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$ROOT_DIR" python main.py build-suggestions \ --tenant-id "$TENANT_ID" \ "$@"