Does MongoDB offer a find or query method to test if an item exists based on any field value? We just want check existence, not return the full contents of the item.
filter_dict = {"key":value} if db.collection.count_documents(filter_dict): print("item is existed") else: print("item is not existed")