The document discusses semantic query expansion (SQE) which aims to improve search results by applying semantic reasoning to expand queries with few results or narrow results with too many. The SQE algorithm first processes the user's query using a fulltext search engine. It then considers search history and semantic knowledge like WordNet to potentially expand the query by adding related terms. Results are reranked based on term frequency, inverse document frequency, and contextual weights from long, mid, and short-term contexts before being returned to the user.