A primary index is an index used to organize both the data store and other indexes for more efficient updating and faster access. Only one primary index may be created over any package. However, a single primary index may be created over multiple packages.
The primary index must be one-to-one or one-to-many when accessing records within the data-store. That is, for each access point within the index there can be any number of records that correspond. However, for each record within the data store there can be, at most, one access point within the primary index. Any type of index except a keyword index may be used as a primary index. All packages within the load should be mapped by a primary index, or none should be.
Proper design of the primary index and packages will:
Increase efficiency in the search process.
Increase updating efficiency.
Decrease memory usage.
The data and other indexes are subdivided into groups defined by the primary index, with one group for each slot in the index. The groups are then further subdivided by the number of packages across which the primary index has been created. A primary index with 1000 slots created across 3 packages would produce 3000 groups.
The combined effect of both primary indexes and packages can be seen on both search engine updating times and end user searching times. When updating the search engine, only those groups that have changed are loaded and processed by the search engine. Those groups are loaded and processed one at a time. This limits the total amount of memory required by the search engine to stay current.
When the primary indexes and packages have been properly designed, the speed of the updating process can be greatly improved. If the design is improper however, too large of a percentage of the total number of groups may change with each update. This could dramatically slow the update process.
When the design of the primary indexes and packages maps well to the parameters normally used to conduct a search, the end user search process can be dramatically enhanced. If they map poorly, there is usually little effect.
Two indexes exist only as primary indexes: a sliding timeline, and package index. When these indexes are created they must be the primary index for the packages they cover.
Range, timeline, spatial and geo-spatial indexes may be a primary index or not.