Improved Document Services Performance with a Forward Index
When it searches for a word in a document, Oracle Text uses an inverted index and then displays the results by calculating the snippet from that document. For calculating the snippet, each document returned as part of the search result is reindexed. The search operation slows down considerably when a document’s size is very large.
The forward index overcomes the performance problem of very large documents. It uses a $O mapping table that refers to the token offsets in the $I inverted index table. Each token offset is translated into the character offset in the original document, and the text surrounding the character offset is then used to generate the text snippet.
Because the forward index does not use in-memory indexing of the documents while calculating the snippet, it provides considerable improved performance over the inverted index while searching for a word in very large documents.
The forward index improves the performance of the following procedures in the Oracle Text CTX_DOC package:
-
CTX_DOC.SNIPPET -
CTX_DOC.HIGHLIGHT -
CTX_DOC.MARKUP
See Also: Oracle Text Reference for information about the forward_index parameter clause of the BASIC_STORAGE indexing type