The present invention is directed to a method and apparatus for establishing documents relationship based on user's operation upon search result. When a user uses search engine to search for documents with a query in repository, the search result may be a list of ranked documents, and these documents may contain a lot of relationship in term of the specific query. If the user clicks some search result further, and if the click and open operation meet certain conditions, for example exceed a period of time, the clicked document could be deemed as related to the search query. Furthermore it could be inferred that there is a strong relationship between different documents clicked by the user. The present invention records the relationship between documents and presents it to the user when necessary.