Library/Patterns/Index

An index is a means of looking up other data quickly.

An index usually is generated from source data and can be rebuilt if necessary. Though, manual indices exist as well.

Implications

 * Changes to object generally need to funnel through a coordinator object of some sort so that object changes affect not only the object itself, but also notify the index. This can be accomplished in various manners:
 * the index itself registers listener objects on the objects in the index
 * a Transaction-based model collects all object changes and sends changes to both the object and relevant indices
 * a Facade pattern is used that all object changes funnel through.

Variations

 * Manual Index
 * Partial Index
 * Local Index

Examples

 * Tag Index
 * Spatial Index