2. The search apparatus according to claim 1 , wherein the indexing term storage unit stores, in association with each of the indexing terms, each document including that indexing term and a partial score corresponding to that indexing term in each document in the index database, and the calculation unit calculates, for each document, the score of that document on the basis of the partial scores corresponding to the first search string and the second search string of each of the search term pairs.
1. A search apparatus for searching for a document corresponding to a specified search term from among a plurality of documents, the search apparatus comprising: an indexing term storage unit for storing an index database having a plurality of character strings each of which is composed of successive characters in each of a plurality of documents with a length equal to a predetermined number of index characters, and is used as an indexing term for that document; a search term pair generation unit for generating at least one search term pair including a first search string with a length equal to the number of index characters and a second search string with a length equal to the number of index characters located at a position shifted by a predetermined number of offset characters relative to the first search string, which are included in the search term; a search unit for searching the index database for a document having both of the first search string and the second search string as indexing terms, for each of the search term pairs; a calculation unit for calculating a score indicating a degree at which each document is included in a search result on the basis of a frequency of occurrence of the first search string and the second search string of each of the search term pairs included in each document or of whether or not the first search string and the second search string are included in each document; a selection unit for selecting a document to be outputted as the search result from among the plurality of documents, on the basis of the respective scores of the plurality of documents; and an output unit for outputting the document selected by the selection unit as the search result.