Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to index #479

Open
halaneji opened this issue Apr 19, 2024 · 0 comments
Open

failed to index #479

halaneji opened this issue Apr 19, 2024 · 0 comments

Comments

@halaneji
Copy link

I have the followed problem, How can i solve it that please?

/django-drf-elasticsearch$ python manage.py search_index --rebuild
/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/management/commands/search_index.py:301: ElasticsearchWarning: this request accesses system indices: [.security-7], but in a future major version, direct access to system indices will be prevented by default
for index in self.es_conn.indices.get_alias().values():
Are you sure you want to delete the 'users, articles, categories' indices? [y/N]: y
Deleting index 'users'
Deleting index 'articles'
Deleting index 'categories'
Creating index 'users'
Creating index 'articles'
Creating index 'categories'
Indexing 0 'Article' objects
Indexing 3 'User' objects
Traceback (most recent call last):
File "/home/hala/work/2024/django-drf-elasticsearch/manage.py", line 22, in
main()
File "/home/hala/work/2024/django-drf-elasticsearch/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 311, in handle
self._rebuild(models, aliases, options)
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 277, in _rebuild
self._populate(models, options)
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/management/commands/search_index.py", line 153, in _populate
doc().update(qs, parallel=parallel, refresh=options['refresh'])
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/documents.py", line 259, in update
return self._bulk(
^^^^^^^^^^^
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/documents.py", line 236, in _bulk
return self.bulk(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/django_elasticsearch_dsl/documents.py", line 178, in bulk
response = bulk(client=self._get_connection(), actions=actions, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/elasticsearch/helpers/actions.py", line 521, in bulk
for ok, item in streaming_bulk(
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/elasticsearch/helpers/actions.py", line 436, in streaming_bulk
for data, (ok, info) in zip(
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/elasticsearch/helpers/actions.py", line 355, in _process_bulk_chunk
yield from gen
File "/home/hala/anaconda3/envs/env/lib/python3.12/site-packages/elasticsearch/helpers/actions.py", line 274, in _process_bulk_chunk_success
raise BulkIndexError(f"{len(errors)} document(s) failed to index.", errors)
elasticsearch.helpers.BulkIndexError: 3 document(s) failed to index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant