add index query validation