composable-indexes already comes with some built-in indexes. Here is a small summary, with links to the relevant documentation:

  • BTreeIndex: An index useful for equality, range & maximum/minimum queries.
  • HashIndex: The most performant index for equality queries.
  • UniqueHashIndex: A hash index that enforces uniqueness.
  • premap: A combinator that allows you to apply another index to a field of a value.
  • group: A combinator that allows you to group values by a field, and apply another index to each group.
  • FoldIndex: An aggregate index that allows you to build the index from a reducer function over the changes to the collection.
  • algebraicGroupIndex: An aggregate index that is useful when the input forms an algebraic group.
  • sumIndex: An aggregate index that sums the values of a field.
  • arithmeticMeanIndex: An aggregate index that calculates the arithmetic mean of the values of a field.
  • countIndex: An aggregate index that counts the number of values.

Generated using TypeDoc