I need to index multiple documents in bulk with making them available to search as soon as possible. So, I want to use refresh in order to suffice this requirement.
I am currently using the code like this below. Taking example from official site
def gendata():
mywords = ['foo', 'bar', 'baz']
for word in mywords:
yield {
"_index": "mywords",
"_type": "document",
"doc": {"word": word},
}
bulk(es, gendata())
I wish to attach a refresh=true to make it visible instantly.
Can you please help me know of this is possible with python bulk API?