A method for creating a query index configured to store document references responsive to a plurality of expected queries, the method comprising: generating, by a computing device, a first plurality of expected queries from an electronic document in a set of electronic documents based on tokens parsed from the electronic document; determining, by the computing device, relevance of each expected query to the electronic document; selecting, by the computing device, a second plurality of expected queries for each electronic document from the first plurality of expected queries for that electronic document based on the relevance of each expected query in the first plurality of expected queries to that electronic document; and performing, by the computing device, the following steps for each expected query in the second plurality of expected queries: ordering tokens in the expected query by decreasing relevance to form an ordered expected query; and creating a plurality of document references, wherein the plurality of document references includes a reference to the electronic document and at least one reference to another document containing the tokens of the expected query in the set of electronic documents; ordering the plurality of document references by decreasing relevance to the expected query to form an ordered list of document references; and creating a first key-value pair for the ordered expected query, wherein the key for the first key-value pair comprises the ordered expected query and the value for the first key-value pair comprises the ordered list of document references. generating, by a computing device, a first plurality of expected queries from an electronic document in a set of electronic documents based on tokens parsed from the electronic document; determining, by the computing device, relevance of each expected query to the electronic document; selecting, by the computing device, a second plurality of expected queries for each electronic document from the first plurality of expected queries for that electronic document based on the relevance of each expected query in the first plurality of expected queries to that electronic document; and performing, by the computing device, the following steps for each expected query in the second plurality of expected queries: ordering tokens in the expected query by decreasing relevance to form an ordered expected query; and creating a plurality of document references, wherein the plurality of document references includes a reference to the electronic document and at least one reference to another document containing the tokens of the expected query in the set of electronic documents; ordering the plurality of document references by decreasing relevance to the expected query to form an ordered list of document references; and creating a first key-value pair for the ordered expected query, wherein the key for the first key-value pair comprises the ordered expected query and the value for the first key-value pair comprises the ordered list of document references. ordering tokens in the expected query by decreasing relevance to form an ordered expected query; and creating a plurality of document references, wherein the plurality of document references includes a reference to the electronic document and at least one reference to another document containing the tokens of the expected query in the set of electronic documents; ordering the plurality of document references by decreasing relevance to the expected query to form an ordered list of document references; and creating a first key-value pair for the ordered expected query, wherein the key for the first key-value pair comprises the ordered expected query and the value for the first key-value pair comprises the ordered list of document references.