Cmdr Riker: "Data, I need help in locating some library-computer information. All I have is a vague memory of reading somewhere about someone taking a shower in his or her clothing."
Lt. Cmdr Data: "Ah. The body Geordi discovered."
Cmdr Riker: "And I believe it may have happened before."
Lt. Cmdr Data: "To 'someone,' 'somewhere.'"
Cmdr Riker: "Should be easy for someone written up in biomechanical texts."
Lt. Cmdr Data: "About that... did the doctor believe I was boasting?"
Cmdr Riker: "Probably. This may take some time?"
Lt. Cmdr Data: "At least several hours. But what I said was a statement of fact."
It would take Data several hours to search all of Star Fleets records for instances of people showering in their clothes. Such records are quite voluminous. Searching for "shower clothes" gets 23,200,000 hits on Google now, it must be many times more in Data's day.
However, the proper data set to search is every bit of text that Riker had ever read, a much smaller set. As every viewer knows, Star Fleet personnel rarely read paper books, those tend to be kept in glass display cases; they read Kindles. And it wouldn't take much programming to keep track of every page that was ever displayed on a Kindle, or displayed in the browser on your computer.
If I remember seeing a bit of information I now need, like the name of the product manager for Keynote (yes I happen to want to know this), it would be quicker looking in web pages I've seen than it would be googling against all of man's knowledge. I doubt I read as many as 100 pages a day. My browser history says I visited 120 URLs on Monday, and that was a heavy day. Humankind as a whole must be writing 10s of millions of English text pages a day, and has been doing so for quite some time.
But to be truly useful, this data set has to be maintained over one's entire life, and include computers, smart phones, Kindles, and every other gadget that tells us something. So, history search is in Safari, but that's only a start.