This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ES_HOST="http://localhost:9200" # Replace with your ES host | |
INDEX_PATTERN="magento2_default_catalog_product_*" | |
# Get all aliases (used indexes) === | |
echo "Fetching all aliases in use..." | |
USED_INDEXES=$(curl -s "$ES_HOST/_cat/aliases?h=index" | sort | uniq) | |
# Get all indexes matching the pattern === |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |