Production Views not returning results intermittently in Java SDK 2.5. 0

Hi ,
Couchbase Server: 5.1.0
Couchbase Java SDK: 2.5.0

I am using below code in my application. And is returning no data intermittently, where there is data in the server. I am using Production view only. Please help me to resolve this issue.

List keys = new ArrayList(Arrays.asList(“TEST_CATEGORY”));
ViewQuery query = ViewQuery.from(“dataSelector”,“dataSelector”);
query.stale(Stale.FALSE);
JsonArray keyJsonArrays = JsonArray.from(keys);
query.keys(keyJsonArrays);
List resultList = new ArrayList();
bucket.query(query).forEach(p-> resultList.add(p.id()));

//ViewQuery(dataSelector/dataSelector){params=“stale=false”, keys="[“TEST_CATEGORY”]"}
logger.debug("queryViewByKeys() query: "+query.toString());

@ismail.iqbal.ap if you query the view on the server with the exact query it returns data, but not from the SDK? Or are you saying there are documents in the cluster but the view in general does not return the data you need?

I always use SDK to get the data from the view. There are documents available in the cluster, and is intermittently not returning the data I need.