15. A method for analyzing and indexing an unstructured or semistructured document, comprising: receiving an unstructured or semistructured document; converting the document to one or more text streams; analyzing the one or more text streams for identifying textual contents of the document; wherein the textual content contains words and bi-words; analyzing the one or more text streams for identifying sections and paragraphs of the document; grouping the paragraphs into sections; analyzing the one or more text streams for identifying context information about each section; creating terms, wherein the terms include the words and the bi-words of the textual content, and the identified context information; indexing the terms in a search index, wherein the search index contains a position id for each term; wherein each position id encodes the section, paragraph, and priority information of the term; wherein the priority assigned to one of the terms is different from the priority assigned to the same term located in another section or paragraph; saving a result of the indexing in a data storage device; wherein the search index is used in a term-based search to identify all the sections, paragraphs, and priorities of each search term matching in the index; wherein the search index is usable in computing a score for each section of the document; further comprising identifying physical page numbers in the unstructured or semistructured document, and mapping logical page numbers to the physical page numbers, wherein each paragraph is individually detected by analyzing the one or more text streams, wherein the paragraphs are identified by: determining geometry information about lines of the text streams; placing the lines into blocks based on a proximity of the lines relative to each other; and analyzing the blocks for joining the lines into paragraphs.
18. The method of claim 15 , wherein the document does not contain format markers.