Entity and relationship extraction turns query text into structured search meaning. Instead of treating “new york city” as unrelated keywords, it identifies phrases, maps spelling variants to canonical entities, and preserves semantic functions for later query interpretation. section 6.4.2 section 7.4.1
A practical extraction pipeline typically performs these steps:
- Normalize the incoming query, tokenize it when necessary, and remove Boolean syntax such as AND and OR. section 6.4.2
- Match query spans against a collection containing surface forms, canonical forms, entity types, spelling variations, and popularity values. section 7.4.1
- Use an FST-backed lookup or Solr text tagger to extract matching entities efficiently from incoming text. section 7.4.1
- Resolve competing matches, retain unmatched text as keywords, and build a typed query tree containing entities and their semantic functions. section 7.4.1
Parsing “top kimchi near charlotte”
The extractor identifies “top” as a popularity function, “near” as a location-distance function, and “charlotte” as a city entity. The remaining “kimchi” becomes a keyword. A resulting typed structure can represent popularity(query, position), the kimchi keyword, location_distance(query, position), and Charlotte with its geographic coordinates.

