production:
  # Configure available database clients. (required)
  clients:
    # Defines the default client. (required)
    default:
      uri: <%= ENV['MONGOLAB_URI'] %>
      options:
        # max_retries specifies the number of times to attempt an
        # operation before giving up.
        max_retries: 5

        # retry_interval specifies the number of seconds to wait before
        # http://blog.mongolab.com/2014/02/mongodb-driver-tips-tricks-mongoid-3/
        retry_interval: 30

        # The time in seconds before Moped will timeout connection and node
        # operations. (default 5)
        timeout: 15

        # The maximum number of connections in the connection pool. (default: 5)
        max_pool_size: 20

  # Configure Mongoid specific options. (optional)
  options:
    # Raise an error when performing a #find and the document is not found.
    # (default: true)
    raise_not_found_error: true

    log_level: :debug

staging:
  # Configure available database clients. (required)
  clients:
    # Defines the default client. (required)
    default:
      uri: <%= ENV['MONGOLAB_URI'] %>
      options:
        # max_retries specifies the number of times to attempt an
        # operation before giving up.
        max_retries: 5

        # retry_interval specifies the number of seconds to wait before
        # http://blog.mongolab.com/2014/02/mongodb-driver-tips-tricks-mongoid-3/
        retry_interval: 30

        # The time in seconds before Moped will timeout connection and node
        # operations. (default 5)
        timeout: 15
  # Configure Mongoid specific options. (optional)
  options:
    # Raise an error when performing a #find and the document is not found.
    # (default: true)
    raise_not_found_error: true

    log_level: :debug

development:
  # Configure available database clients. (required)
  clients:
    # Defines the default client. (required)
    default:
      # Defines the name of the default database that Mongoid can connect to.
      # (required).
      database: search_development
      # Provides the hosts the default client can connect to. Must be an array
      # of host:port pairs. (required)
      hosts:
        - localhost:27017
  options:
    # Raise an error when performing a #find and the document is not found.
    # (default: true)
    raise_not_found_error: true

test:
  clients:
    default:
      database: search_test
      hosts:
        - localhost:27017
      options:
        read:
          mode: :primary
        # In the test environment we lower the retries and retry interval to
        # low amounts for fast failures.
        max_retries: 1
        retry_interval: 0
  options:
    # Raise an error when performing a #find and the document is not found.
    # (default: true)
    raise_not_found_error: true
