The golden rule of "don't make dick rulings" helps a bit. Don't make any risky decisions on behalf of players and don't rule out the obvious unless it's risky. However, if this guideline doesn't feel specific enough, here's another guideline: when a player says "I search the room" and the GM asks "how?", what the GM really wants to know is:
- Where do the characters look?
- What sense(s) are being used? (sight, sound, touch, odor, taste)
- What are the characters doing that might improve (or reduce!) the chances of finding anything?
If you're the GM, interpret "where" as liberally as possible: "I search the walls and floor" means all parts of the floor, even behind the statue where a switch is located, unless they can't search behind the statue without doing something else first, like moving the statue (in which case, tell them this! "You can't search the walls and floor behind or under the statue unless you move it. Do you want to try?") or unless there's an obvious risk (in which case, tell them this! "You can't search the walls and floor behind the statue unless you jump over the pit that surrounds the statue. Do you want to try?")
If the players are vague about how they search, ask them specifically "What senses are you using? Are you just looking, or are you feeling with your hands, or what?" Also ask how close they get and how they move.
"I look at the floor carefully without entering the room" is very safe, but can miss small things far from the doorway, as well as sections of the floor under or behind objects.
"I look at the floor carefully, cautiously moving forward when it looks safe, examining every section closely" can be a little risky, but should be much less risky than walking into the room after a casual visual search from the doorway.
"I feel the floor with my hands, crawling slowly across every section closely" can be even riskier (Contact poison! Vulnerable!) but catches a lot of details a visual search will miss, because it involves another sense (touch) and getting very close.
"I look at the floor carefully, tapping the section immediately in front of me with a pole and listening to the sound as I cautiously move forward" is much less risky and catches even more details because it involves a third sense (hearing,) but the character will miss some tactile details because of the indirect contact.
Adding another method like "I hold a torch close to the surface" or "I rub away any dust on the stones" can reveal more detail or introduce new risks. Any search method will have benefits and drawbacks, the broadest ones being risk vs. time spent.
However, the GM should never be a stickler about the precise verbal phrasing, only the precise conceptual phrasing. "Walls and floor" means "all the walls, and the entire floor," even if the player doesn't use the word "all"; it doesn't mean "on top of the tall cabinet", unless the player says "and on top of the cabinet". Nor should the GM read too much into fine distinctions between words; using the word "glance" instead of "look" or "scan" shouldn't matter. If a person could see a detail and they are close enough and have enough light to see the detail, they should see the detail.
So: players, focus on explaining where you search, with what sense, and what you're doing that you think should help the search, and you should be good in games run by fair GMs. And GMs, only punish or withhold information based on where the characters search, with what senses, and what they specifically do, and plan tricks, traps, and secrets with those three questions in mind.