Command search:clear doesnt consider prefix
pedrocasado opened this issue · comments
Pedro Casado commented
- Symfony version: 3.4.26
- Algolia Search Bundle version: 3.4.0
- Algolia Client Version: 1.28.0
- Language Version: php7.2
Description
The search:clear command doesnt consider prefix on index name.
Steps To Reproduce
- Create an index called prod_product
- Create an entity Product
- Setup bundle
algolia_search:
prefix: prod
indices:
- name: product
class: AppBundle\Entity\Product
enable_serializer_groups: true
- Run task
$ ./bin/console search:clear --env=prod
```
Result:
```
Index product couldn't be cleared
Done!
Index name should consider prefix and be prod_product
Pedro Casado commented
Specifying the -i option it does clear the correct index.
./bin/console search:clear --env=prod -i product
The result should be the correct index name (prod_product), but thats ok.
Cleared product index of AppBundle\Entity\Product
Done!