Well my guess would be that they have a structured data back end of titles, authors, and so forth. They can then look at the query string and extract everything that looks like a proper noun (or doesn't exist in a dictionary) and and compare that against their structured data database.
I'm sure it's more advanced than that but that would get you pretty far.