Patent ID: 8296304

Claim:
A method for handling redirects in documents, comprising: while generating an index, determining a rank for each of the documents, wherein the rank represents an importance of each document relative to the other documents; forming at least one equivalence class that includes documents that are connected through a redirect, wherein each equivalence class describes a redirect chain; detecting cycles for each equivalence class, wherein documents in a cycle are marked so that they are not indexed, and, wherein, for each equivalence class, the cycle is formed when a last document in the redirect chain redirects to a first document in the redirect chain; detecting incomplete chains for each equivalence class, wherein documents in an incomplete chain are marked so that they are not indexed, and, wherein, for each equivalence class, the indirect chain is formed when a last document in the redirect chain redirects to a document that has not been crawled; selecting a representative for each equivalence class whose documents are to be indexed, wherein the representative is associated with a path that indicates a location of a document in a data store; detecting duplicate documents in two different equivalence classes; and merging the equivalence classes.