Added matches query API that returns matches on query