index: add variable type information in queryState()