1. A method of a system having a processor, comprising: in response to receiving a query having a search term, accessing an inverted index that is defined on a set of attributes of a database structure, wherein the inverted index associates values of the set of attributes with corresponding references to rows of the database structure; determining whether any of the attributes in the set is in the search term; in response to determining that any of the attributes in the set is in the search term, determining that the inverted index is useable to produce an answer to the query; in response to receiving the query, creating a first copy of the inverted index; and sorting the first copy of the inverted index according to at least one attribute in the search term of the received query, wherein producing the answer uses the sorted copy of the inverted index.