META().expiration uses covered index it gives right results. When used non covered index it gives 0.
This needs to be documented for Spock may not be addressable in Spock due to following reasons.
1) N1QL fetches data from memecached using GET. The GET call is not includes expiration, seqno, etc...
2) To get this information we need to do GET_META call.
3) Making additional call for each key for SELECT/UPDATE... etc can cause latency can be doubled and through put drops drastically. Also the data between two calls can be out of sync.
The possible solution is defined new protocol and pass as bit flags that what information needed as single call.
See MB-15950 and it comments more details.