Can't create View at couchbase lite

Hi,

I want to create a View using couchbase lite .
com.couchbase.lite.View view = database.getView(“jowelList”);

    if(view == null){
        System.out.println("Called from null");
    }

        view.setMap(new Mapper() {
            @Override
            public void map(Map<String, Object> document, Emitter emitter) {

                System.out.println("Called from inside");

            }
        },"1.0");

Can anyone explain. why i didn’t gat any document & didn’t call inside the method?

You probably didn’t query the view.

View indexes are updated lazily, so the map function is only called when the view is queried (if it’s the first time, or if documents have changed since the last time you queried.)

Can you please explain, How to write query . i created a liveQuery ,but didn’t call .

I need to show a item details . How i will do query for every selected item details every time ?