Short answer: just stick ?refresh on the bulk request.
Long answer: It depends on your use case a bit. One way is to add ?refresh on the bulk request if there is only a single bulk request. If you have a bunch of bulk requests then you can issue a refresh request after all of them. Both of these immediately make the data available - it'll be ready for search as soon as the response comes back.
The downside of explicit refreshes is that they create segments "right now". That means that they can create small segments. If you aren't adding other data to the index and you know you are done they is no downside to forcing a refresh - waiting for one wouldn't make anything better.
If you are adding data to the index at the same time as something you need to be visible then master has ?refresh=wait_for that will let you, "wait for" the action to be made visible by some other refresh. Again, you don't need it if you are the only writer. It is for when you are writing and there will be other writes between yours and the scheduled refresh.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.