How can I fetch only one field with pyes?

there are many fields in document, but I want to get only one filed. How
can I specify the condition with pyes?

i tried:

fields=["ip"]
result = conn.search(query=q, indices=[index_name], fields=fields)

but failed.

any help would be appreciated.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.