I do not have experience with N1QL. However i just found this thread which might be helpful?
link to thread