Add support for searching for query by id