-1

My input is <index_name>, <doc_id>, <field_name>, i want the value of the field

I am looking for python-client equivalent of

GET <index_name>/_doc/<doc_id>/?_source_includes=<field_name>
Kaushik J
  • 962
  • 7
  • 17

1 Answers1

1

I figured it out

from elasticsearch import Elasticsearch
es = Elasticsearch()
result = es.get(
             index=<index_name>,
             id=<doc_id>,
             _source_includes=<field_name>
         )
Kaushik J
  • 962
  • 7
  • 17