1. A computer-executed method comprising: identifying at least one path expression in a particular query that does not match an index definition path expression for a particular structured index; in response to identifying the at least one path expression in the particular query that does not match an index definition path expression for the particular structured index: based on identifying a common context between two or more path expressions of a first set of path expressions, forming a fused path expression from the two or more path expressions; wherein the particular query includes the path expressions of the first set; determining that the fused path expression matches an index definition path expression for the particular structured index; and in response to determining that the fused path expression matches an index definition path expression for the particular structured index: rewriting the particular query to include a subquery on the particular structured index; wherein the subquery is configured to retrieve, from the particular structured index, information referred to in the fused path expression; wherein the method is performed by one or more computing devices.