NE
Red, theory; black, fact.
The Google search is one of those things that are too good a trick for Nature to miss (TGTNM) and she didn't, and it's called consciousness.
Brain mechanism of consciousness
I conjecture that the human brain launches something like a Google search each time an attentional focus develops. This is not necessarily a literal focus of activity on the cortex; it is almost certainly a sub-network activation. The sub-net activity relays through the prefrontal cortex and then back to sensory cortex, where it activates several more sub-nets; each of these, in turn, activates further sub-nets via the prefrontal relay, and so on, exponentially. At each stage, however, the degree of activation declines, thereby keeping the total cortical activation limited.
Accounting for subjective experience
The first-generation associations are likely to be high in the search rankings, and thus subjectively "close" to the triggering attentional focus and relatively strongly in consciousness, although still in the penumbra that is subjectively "around" the attentional focus. Lower-ranking search results would form a vast crowd of associations only dimly in consciousness, but would give conscious experience its richness. Occasionally, an association far out in the penumbra will be just what you are looking for, and will therefore be promoted to the next attentional focus: you get an idea.
The role of emotions
The evaluation process responsible for this may involve the mediolateral connections of the cortex, which lead back to the limbic system, where emotions are thought to be mediated, at the cingulate gyrus. Some kind of pattern recognition seems unavoidable, whereby a representation of what you desire <06-25-2021: itself a sub-network activation> elaborated by the mediolateral system is matched to retrieved associations. Your target may be only a part of the retrieved association, but will suffice to pull the association into the attentional focus.
This is a great system, because it allows a mammal to converge everything it knows on every task, rather than having to perform as a blinkered if-then machine.
Brain mechanisms and our evolutionary history
01-02-2021: Why should we have this back-and-forthing between the prefrontal cortex and the sensory association cortex? Two possibilities: 1) the backward projections serve a priming function, getting certain if-then rules closer to firing threshold in a context-sensitive manner; 2) This is a uniquely human adaptation for our ecological niche as environment modifiers. In ordinary tool use and manufacturing, dating back to Homo habilis, the built thing is smaller than the builder's body, but in environment modification, the built thing is larger than the builder's body—an important distinction. Thus, the builder can only see one part of it at a time. Viewings must therefore be interleaved with reorientations involving the eyes, neck, trunk, and feet. These reorientations, being motoric in nature, will be represented frontally, and I place these representations in the prefrontal cortex. The mental representation of the macro-built-thing therefore ends up being an interleaved collection of views and reorientations. <07-11-2021: In other words, a simulation.> The reorientations would have to be calibrated by the vestibular system to allow the various views to be assembled into a coherent whole. By this theory, consciousness is associated with environment modification.
05-24-2021: Consistent with this theory, the cortical representation of vestibular sense data is atypical. There is no "primary vestibular area." Rather, islands of vestibular-responsive neurons are scattered over the sensory cortex, distributing across the other senses. This seems analogous to a little annotation for xyz coordinates, etc., automatically inserted in a picture, as seen in computer-generated medical diagnostic images.