Suppose there is a document with the following fields:
id title text date I need to return the list id. at the moment doing this:
es = Elasticsearch([host, ], http_auth=(user, passwd), port=9200 ) s = Search(using=es, index='docs', doc_type='doc') s.source(['id', ]) es_ids = [h.meta.id for h in s.scan()] But it seems to me that this is not it. It turns out all the documents come to me (or do I not understand correctly?) And there are currently more than 100k there and will soon be hundreds of times more. Tell me how to return only one field. list, maybe there is such a thing? Maybe you need to use some kind of Q from elasticsearch_dsl ? I would be happy to help.