First implementation of index querying