In order to search a file to be searched which includes records having
fields allocated to each of a plurality of hierarchical levels and is
constructed so that records having a same key character string in a field
at a same hierarchical level are arranged in series, an index file is
created by obtaining start position information and number information
about records having a key character string contained in the hierarchical
level of each node on the file to be searched, or a pointer to node
management information of a lower hierarchical level, and by recording
the information obtained for the nodes of all the hierarchical levels.
Further, data is extracted from the file to be searched by using the
record start position information, the record number information, and the
pointer to the node management information of a lower hierarchical level
recorded in the index file.