How publish works in retrieving data from couchbase?

Why do we need to publish the view while retrieving the data which is being inserted into couchbase?( an application where my UI will start inserting data into the couchbase on a button click and meanwhile ,while data is being inserted I want to retrieve already inserted content in the next immediate line of my UI where on clicking the name of the current loading file it should display the content.

But unless I publish the view manually ,I am not able to show the result of the current loading file.

How to automate publish or how to fix this issue?