Any of the following commands will be executed on just one index
ongr:es:cache:clear
ongr:es:index:create
ongr:es:index:drop
ongr:es:index:export
ongr:es:index:import
Console output:
# Drop indices
www-data@41995e1973b5:/php$ bin/console ongr:es:index:drop -f
The index `acme_banana` was successfully dropped.
# Create indices
www-data@41995e1973b5:/php$ bin/console ongr:es:index:create
Created `acme_banana` index.
# Clear cache
www-data@41995e1973b5:/php$ bin/console ongr:es:cache:clear
[OK] Elasticsearch `acme_banana` index cache has been cleared.
# Export
www-data@41995e1973b5:/php$ bin/console ongr:es:index:export foo.json
# foo contains data of index `acme_banana`
# and so on...
Our workaround is a bash script to loop over all indices for tasks such as mapping updates/cache clear/reindex etc.
ONGR cli commands act on unpredictable indices when executed without
--index
optionExpected behaviour:
--index
option should be either required OR commands should be executed on all indices (where possible)Actual behaviour:
--index
Steps to reproduce:
Having mutliple indices + document classes:
config.yml
Any of the following commands will be executed on just one index
ongr:es:cache:clear
ongr:es:index:create
ongr:es:index:drop
ongr:es:index:export
ongr:es:index:import
Console output:
Our workaround is a bash script to loop over all indices for tasks such as mapping updates/cache clear/reindex etc.