class SemanticLogger::Appender::MongoDB

def create_indexes

Creates an index based on tags to support faster searches.

* A find will always return the documents in their insertion order
* Documents are always stored in insertion order
* Document updates cannot make them any larger
* Documents cannot be deleted,
* No indexes by default (not even on _id)
Features of capped collection:

Create the required capped collection.
def create_indexes
  # Create Capped collection
  begin
    @collection.create
  rescue Mongo::Error::OperationFailure
    nil
  end
  @collection.indexes.create_one(tags: 1)
end