def update(field, value, db, collection, match=None):
c = db[collection]<EOL>match = match if match is not None else {}<EOL>if db.client.server_info()['<STR_LIT:version>'].startswith('<STR_LIT:2>'):<EOL><INDENT>c.update(match, {'<STR_LIT>': {field: value}}, multi=True)<EOL><DEDENT>else:<EOL><INDENT>c.update_many(match, {'<STR_LIT>': {field: value}})<EOL><DEDENT>
Updates MongoDB documents.

Sets ``field`` equal to ``value`` for all documents that
meet ``match`` criteria.

Arguments:

    field (str): Field to update.

    value (str): Update value.

    db (Database): A pymongo Database object.

    collection (str): Collection name.

    match (dict): A dictionary containing the match criteria, for example::

        {'seq_id': {'$in': ['a', 'b', 'c']}, 'cdr3_len': {'$gte': 18}}