handling querying for specific attributes within index

When I query within index for specific attribuetes, exception is raised. This is a quick fix, and test are passing, but i'm not sure if it will mess up something else.