A natural practice to perform the task is to scan through the query text using the dictionary and treat terms matched with a list of entries of the dictionary as the entities (Nadeau et al., 2006;Gerner et al., 2010;Liu et al., 2015;.
this practice requires very high quality named entity dictionaries that cover most of entities, otherwise it will fail with poor performance.