1. A method for optimizing a document format in a query system comprising: receiving documents including at least a portion of content in an unstructured format; storing the received documents in a repository for querying; responsive to detecting a predetermined number of the documents including the unstructured format stored in the repository for querying, applying an optimization criteria to identify one or more components of the stored documents for a conversion, wherein applying the optimization criteria comprises analyzing groups of the stored documents to identify repeating key-value pairs; converting the one or more components of the stored documents associated with an identified key-value pair from the unstructured format to a structured format by storing a key once and corresponding values for the key in a column-based format transparent to a querying application, wherein at least one document comprises one or more converted components in the structured format and one or more components in the unstructured format; and removing repeating key names and values of the identified key-value pair from the unstructured portion of the stored documents associated with the identified key-value pair and placing the removed key names and values into a structured portion of those documents.