adding match API for secondary indexes