doc: add documentaion about optional 3rd argument for query function