12. A computer program product, the computer program product being tangibly embodied on a non-transitory computer-readable storage medium and comprising instructions that, when executed, are configured to cause at least one processor to: receive a plurality of queries from a user and applied by a search engine to obtain corresponding search results, including identifying at least one search session of the user during which the plurality of queries were received in a sequence; generate, based on the plurality of queries, directed an initial graph of nodes, each node corresponding to at least one query and connected by an edge to another node in an order corresponding to the sequence, wherein the order and the sequence include at least one conflict in which a first parent node is connected by a first edge to at least one child node that is itself a second parent node connected by a second edge to the first parent node; detect the at least one conflict and resolve the at least one conflict including determining that the second parent node corresponds to a higher value of at least one search quality metric than the first parent node, and then removing the second edge, based on the determining, to thereby transform the initial graph into a directed graph; merge at least two of the nodes based on a similarity of corresponding queries thereof, to obtain a merged node; relate the merged node with a domain topic of an ontology base; generate at least one representative query representing the merged node, based on the ontology base; match a current query with a matching node of the nodes; follow the directed graph from the matching node until determine that the merged node is reached within the directed graph; and provide the at least one representative query to the user as a suggested query for a future search to be conducted by the search engine.
13. The computer program product of claim 12 , wherein at least one directed edge of the directed graph is annotated with a weight indicating a number of times that a corresponding sequence pair of queries occurred.