Patent ID: 8271499

Claim:
A method for limiting updates of inverted indexes in a database, the method comprising: calculating a first inverse document frequency for each n-gram in a plurality of strings; calculating a first inverse document frequency related length for each string in the plurality of strings; for each n-gram, creating an inverted list comprising the strings containing the n-gram; sorting each inverted list by the first inverse document frequency related length of the strings in the inverted list; receiving an update to the plurality of strings; determining which n-grams are affected by the update; calculating, based on the update, a second inverse document frequency of the affected n-grams; determining which strings are affected by the update; calculating, based on the update, a second inverse document frequency related length of the affected strings; determining which inverted lists are affected by the update; and for each affected inverted list: calculating an error based on the second inverse document frequencies; determining whether the error is less than a predefined error threshold; and upon determining that the error is not less than the predefined error threshold, updating the affected inverted list; and answering a query based on the updated affected inverted lists.