1. A text search apparatus comprising: a memory comprising: a document storage for storing document data that includes multiple categories of character string data, the multiple categories of character string data including at least one forward-matching-search target category that is a target of a forward matching search; and an index information storage for storing N-gram index information that includes the multiple categories of character string data, wherein a beginning mark is added before a beginning character of character string data contained in the at least one forward-matching-search target category, and no beginning mark is added before a beginning character of character string data contained in any remaining category of the multiple categories, the beginning mark indicating the beginning of the character string data; and a processor that is operable to function as: an acquirer which acquires a search keyword; an incremental searcher which adds the beginning mark before a beginning character of the acquired search keyword, generates N-gram data based on the search keyword having the beginning mark added, and performs, based on the N-gram index information, the forward matching search on the character string data contained in the at least one forward-matching-search target category; a main searcher which generates N-gram data based on the acquired search keyword without adding the beginning mark before a beginning character of the acquired search keyword, and performs, based on the N-gram index information, a partial matching search on character string data contained in the multiple categories; and an outputter which outputs a result of the forward matching search and a result of the partial matching search; wherein the document data is dictionary data that includes an entry-word data category and a commentary data category, and the at least one forward-matching-search target category contains the entry-word data category.