- MongoDB C Driver 1.13.1 »
- API Reference »
- mongoc_collection_t

# mongoc_collection_find_indexes()

## Synopsis

    mongoc_cursor_t *
    mongoc_collection_find_indexes (mongoc_collection_t *collection,
                                    bson_error_t *error);

## Deprecated

This function is deprecated and should not be used in new code.

Please use mongoc_collection_find_indexes_with_opts() instead.

Fetches a cursor containing documents, each corresponding to an index on this collection.

## Parameters

- `collection`: A mongoc_collection_t.
- `error`: An optional location for a bson_error_t or `NULL`.

## Errors

Errors are propagated via the `error` parameter.

## Returns

A cursor where each result corresponds to the server’s representation of an index on this collection. If the collection does not exist on the server, the cursor will be empty.

Created using Sphinx 1.8.3, based on Sphinx Readable Theme.