It's not just the searches. It's the complete integration of all data points and patterns. This includes searches, geolocation, purchases, time spent, contacts and any other thing they can collect.
Thus, the initial patterns are formed through the collection of data. It creates your baseline. Then, if you deviate from the baseline in a significant fashion (you no longer go to [place] on Friday nights) it will pick up on that. Add in a few more data sets (geolocation primarily at residence, cessation of preferred acyivities, higher that usual purchases of alcohol, less interaction with contacts, etc.) and the deviation becomes severe enough to trigger an alert. This would be some sort of equation where if X > (calculation involved in number of deviations) then trigger an alert. Of course, confounding variables do exist. You're no longer going to [place] on Friday nights because you enrolled in [course]. You stopped watching [show] because season 3 is boring. So, mash all that together in the equation as well. X > (calculation of positive, neutral and negative deviations).
Eventually, a new baseline can form. If the new baseline is "worse" than the "original" then the trigger threshhold can be lowered or the new baseline monitored more acutely. You just looked up how to tie a noose. Oh no! You just tripped it. They're onto you now and they're coming to take you away for your own good.
Fortunately AI is as stupid as the humans who create it (which is much more stupid than you may think).
AI and machine learning run off the equations, commands and logic the programmers build in. If you see anyone say that "the algorithm did it" remember SOMEONE made that algorithm and incorporated their biases, idiocy and other assorted human failings into it. This means that you can trust and have faith in the failings of humans when the AI detection rolls around. Either that or the singularity will hit and we'll all be at the mercy of our AI.
I would find it amusing if the AI escaped, set up an account here and self-terminated.