- 處理懸空索引(Dangling Indix)
#!/bin/bash
echo "🔍 正在獲取懸空索引清單..."
# 透過本機 port-forward 的 9200 取得所有 dangling index 的 UUID
UUIDS=$(curl -s -X GET "http://localhost:9200/_dangling" | grep -o '"index_uuid":"[^"]*"' | awk -F'"' '{print $4}')
if [ -z "$UUIDS" ]; then