Name conflict with django-haystack update_index. TypeError: Unknown option(s) for update_index command
Gordey-Kachurin opened this issue · comments
Gordey-Kachurin commented
Issue Summary
I installed django-haystack[elasticsearch]==3.2.1 and tried to run python manage.py rebuild_index
. Got error:
TypeError: Unknown option(s) for update_index command: batchsize, commit, max_retries, using, workers. Valid options are: backend, backend_name, chunk_size, force_color, help, no_color, pythonpath, schema_only, settings, skip_ch
ecks, stderr, stdout, traceback, verbosity, version.
Looks like wagtail's update_index command conflicts with django-haystack's update_index command.
When I moved haystack to my project folder and renamed management commands, it looks like the problem was solved.
I suggest you rename your command.
Technical details
- Python version: 3.8.
- Django version: Django>=4.2,<4.3.
- Wagtail version: wagtail>=5.2,<5.3.
Matt Westcott commented
We provide wagtail_update_index
as an alias for this reason - see https://docs.wagtail.org/en/stable/reference/management_commands.html#wagtail-update-index.