You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
# This errors out.
import elasticutils
elasticutils.get_es().index({'object_id': 'id2'}, 'some_object_index', 'object', id='query_hash_1')
elasticutils.get_es().index({'object_id': 'some_object_id'}, 'some_object_index', 'object', id='query_hash_2')
[a for a in elasticutils.S().filter(object_id='some_object_id').indexes('some_object_index')]
# This works.
import elasticutils
elasticutils.get_es().index({'id': 1, 'object_id': 'id2'}, 'some_object_index', 'object', id='query_hash_1')
elasticutils.get_es().index({'id': 2, 'object_id': 'some_object_id'}, 'some_object_index', 'object', id='query_hash_2')
[a for a in elasticutils.S().filter(object_id='some_object_id').indexes('some_object_index')]
What's going on is that we default to asking for at least the id field, but there is no id field. In the case where the list of fields don't exist, ES doesn't return a fields key in the result dict. Need to handle that case better.
The text was updated successfully, but these errors were encountered:
What's going on is that we default to asking for at least the
id
field, but there is noid
field. In the case where the list of fields don't exist, ES doesn't return afields
key in the result dict. Need to handle that case better.The text was updated successfully, but these errors were encountered: