WIP: query matching.