Some properties shown in the Viewer's Property panel might be inherited from other objects. When using search(), inherited properties won't be taken into account. So it's possible to have an object that lists a property "Structural Material" = "Concrete - Cast-in-Place Concrete", yet when searching for that value that same object will not be returned - see image on top.
A new option for search() was introduced in v7.32 of the Viewer, called includeInherited - see V7 Changelog
If you set it to "true" then our object will now be returned as well - see image on top.