Module: Mongo::Index

Defined in:
lib/mongo/index.rb,
lib/mongo/index/view.rb

Overview

Contains constants for indexing purposes.

Since:

  • 2.0.0

Defined Under Namespace

Classes: View

Constant Summary

ALL =

Wildcard constant for all.

Since:

  • 2.1.0

'*'.freeze
ASCENDING =

Specify ascending order for an index.

Since:

  • 2.0.0

1
DESCENDING =

Specify descending order for an index.

Since:

  • 2.0.0

-1
GEO2D =

Specify a 2d Geo index.

Since:

  • 2.0.0

'2d'.freeze
GEO2DSPHERE =

Specify a 2d sphere Geo index.

Since:

  • 2.0.0

'2dsphere'.freeze
GEOHAYSTACK =

Specify a geoHaystack index.

Since:

  • 2.0.0

'geoHaystack'.freeze
TEXT =

Encodes a text index.

Since:

  • 2.0.0

'text'.freeze
HASHED =

Specify a hashed index.

Since:

  • 2.0.0

'hashed'.freeze
COLLECTION =

Constant for the indexes collection.

Since:

  • 2.0.0

'system.indexes'.freeze