Is it possible to perform retry on a N1QL query such as the below?
query = select * from bucket use keys 'KEY';result = bucketObj.query(N1qlQuery.simple(query));
If yes, can anyone please give a code snippet?
The async API makes this relatively straightforward I believe, but a couple higher level questions… 1) Under what circumstances do you want to retry this? Generally it shouldn't be necessary-- unless there's a failure while in flight. 2) If you're just getting the full document, perhaps you should use the .get() operation at the bucket level? That'll be faster and more efficient.
@ingenthr.. 1) I have a bucket with 300 k documents and the query mentioned above times out every now and then.. Hence I want to retry the execution of the query. 2) Querying with document ID I can use .get(). But I also use N1ql with filters. I want to know if those can be retried as well.