1. A document retrieval apparatus comprising: a document storage unit for storing a document to be searched; a document size storage unit for storing a data size of the document such that the data size is associated with a document ID for identifying the document; a retrieval document size calculation unit for reading out from the document size storage unit the data size associated with the document ID indicating the document to be searched, and calculating a retrieval document size by adding up the read out data size(s); a prospect time calculation unit for calculating a first estimated time taken for a retrieval process by a first retrieval method and a second estimated time taken for the retrieval process by a second retrieval method, based on the retrieval document size; a retrieval method decision unit for comparing the first and second estimated times and deciding which retrieval method to use for performing the retrieval process, the first method or the second method; a retrieval key input unit for receiving an input of a first and second retrieval keys; an index storage unit for storing the retrieval key contained in the document and the document ID such that they are associated with each other; a retrieval action unit for performing a process of retrieving the document containing the retrieval key; and a retrieved document ID storage unit for storing a retrieved document ID indicating the document containing the retrieval key, and wherein the first retrieval method is an index scan method of retrieving the document ID associated with the retrieval key from the index storage unit; the second retrieval method is a text scan method of searching, for each of the documents stored in the document storage unit, whether or not the retrieval key is contained in the document; the retrieval action unit retrieves the document containing the first retrieval key in accordance with the first retrieval method, and stores in the retrieved document ID storage unit the retrieved document ID indicating the document containing the first retrieval key; the retrieval document size calculation unit reads out from the document size storage unit the data size associated with each of the retrieved document IDs stored in the retrieved document ID storage unit, and calculates the retrieval document size by adding up the read out data sizes; and the retrieval method decision unit compares the first and second estimated times and decides which retrieval method to use for performing the process of retrieving the document data containing the second retrieval key, the first method or the second method.
1. A document retrieval apparatus comprising: a document storage unit for storing a document to be searched; a document size storage unit for storing a data size of the document such that the data size is associated with a document ID for identifying the document; a retrieval document size calculation unit for reading out from the document size storage unit the data size associated with the document ID indicating the document to be searched, and calculating a retrieval document size by adding up the read out data size(s); a prospect time calculation unit for calculating a first estimated time taken for a retrieval process by a first retrieval method and a second estimated time taken for the retrieval process by a second retrieval method, based on the retrieval document size; a retrieval method decision unit for comparing the first and second estimated times and deciding which retrieval method to use for performing the retrieval process, the first method or the second method; a retrieval key input unit for receiving an input of a first and second retrieval keys; an index storage unit for storing the retrieval key contained in the document and the document ID such that they are associated with each other; a retrieval action unit for performing a process of retrieving the document containing the retrieval key; and a retrieved document ID storage unit for storing a retrieved document ID indicating the document containing the retrieval key, and wherein the first retrieval method is an index scan method of retrieving the document ID associated with the retrieval key from the index storage unit; the second retrieval method is a text scan method of searching, for each of the documents stored in the document storage unit, whether or not the retrieval key is contained in the document; the retrieval action unit retrieves the document containing the first retrieval key in accordance with the first retrieval method, and stores in the retrieved document ID storage unit the retrieved document ID indicating the document containing the first retrieval key; the retrieval document size calculation unit reads out from the document size storage unit the data size associated with each of the retrieved document IDs stored in the retrieved document ID storage unit, and calculates the retrieval document size by adding up the read out data sizes; and the retrieval method decision unit compares the first and second estimated times and decides which retrieval method to use for performing the process of retrieving the document data containing the second retrieval key, the first method or the second method. 2. The document retrieval apparatus according to claim 1 , wherein: the retrieval method decision unit determines whether or not to perform a process of deciding the retrieval method used for retrieving the document data, depending on whether or not the number of the retrieved document IDs is equal to or less than a predetermined number; and the retrieval method decision unit, if determining to perform the process of deciding the retrieval method, then compares the first and second estimated times, and decides which retrieval method to use for performing the process of retrieving the document containing the second retrieval key, the first method or the second method, or the retrieval method decision unit, if determining not to perform the process of deciding the retrieval method, then decides to perform the process of retrieving the document data containing the second retrieval key in accordance with the first method.