f251cf2d
tangwang
suggestion全量索引程序跑通
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/env bash
#
# Convenience script to rebuild suggestion index for a tenant.
#
# Usage:
# ./scripts/build_suggestions.sh <tenant_id> [--days 30] [--batch-size 500] [--min-query-len 1] [--es-host http://localhost:9200]
#
set -euo pipefail
if [ $# -lt 1 ]; then
echo "Usage: $0 <tenant_id> [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" \
"$@"
|