fix index interface, takes Query pointer