A structured document management device comprising:
- a communication unit configured to receive a structured document from a client device via a network;
- a document analyzing unit configured to analyze a structure of the structured document and extract text information of the structured document;
- a schema creating unit configured to create first schema information that indicates a structural characteristic of the structured document;
- a schema storage unit configured to store second schema information created in advance by the schema creating unit and schema identification information for identifying the second schema information in association with each other;
- a search unit configured to search the schema storage unit for the second schema information that substantially matches the first schema information;
- an adding unit configured to add, to the structured document, the schema identification information for identifying the second schema information searched by the search unit and identification information for identifying the structured document;
- an index creating unit configured to divide the text information into words and create index information associated with the schema identification information and the identification information for each of the words divided;
- an index storage unit configured to store the index information in a file format;
- an index analyzing unit configured to analyze, when a number of pieces of the index information stored in the file format exceeds a threshold, a distribution of a schema identification information group that includes pieces of the schema identification information equal in number to the pieces of the index information and an identification information group that includes pieces of the identification information equal in number to the pieces of the index information;
- a first rule storage unit configured to store the schema identification information, group identification information provided for uniquely identifying a group to which the schema identification information belongs and used in compression of the schema identification information group, and in-group identification information provided for uniquely identifying the schema identification information in the group and used in compression of the schema identification information group, in association with each other;
- a second rule storage unit configured to store a plurality of compression rules;
- a first compressing unit configure to compress, when a result of distribution analysis of the schema identification information group shows that more than a predetermined number of pieces of the schema identification information match pieces of the schema identification information stored in the first rule storage unit, the schema identification information group using the group identification information and the in-group identification information;
- and
- a second compressing unit configured to compress at least one of the schema identification information group and the identification information group using the compression rule stored in the second rule storage unit and determined in accordance with a result of distribution analysis of the index information.