Deciding Which Attributes to Retrieve for Each Object Found
If you search for objects of a particular class, it seems logical that you retrieve attributes that actually exist on the objects of that class. Follow the same rules discussed in Finding a List of Attributes To Query. Be aware that constructed attributes can be retrieved in query, but constructed attributes cannot be used in filters.