I face this problem a lot while searching phone numbers and bank account numbers
ID: 652898 • Letter: I
Question
I face this problem a lot while searching phone numbers and bank account numbers, when I do remember it partially.
I save a draft in gmail with the content I am mango. Then I search it, by entering just mango and it gets me to the draft.
But when I save a draft with some number such as 123987645 and try to search by entering 12398764 i.e just one character missing I fail to find it. Also I failed when I just typed 87645.
Out of curiosity I am asking are the algorithms for finding numbers and text fundamentally different? Or I am missing something?
Explanation / Answer
There is no reason to assume that numbers and words are treated differently: for their servers, both are just strings. Different behaviour would be extra work and I don't see why that would be useful here.
There is one possible explanation for the behaviour you see: maybe they don't search for parts of words!
It is easy to preprocess texts so that finding whole words is fast. Well, looking for any substring is not that much slower (cf suffix trees) but it generates more data to store. Given the amount of data Google deals with, they might have a numbered dictionary and save tuples like (msg_id, position, word_id) (or similar)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.