Implement indices query.