MongoDBDocStore(
self,
collection: Collection,
text_key: str = 'page_content'
)| Name | Type |
|---|---|
| collection | Collection |
| text_key | str |
MongoDB Collection providing BaseStore interface.
This is meant to be treated as a key-value store: [str, Document]
In a MongoDB Collection, the field name _id is reserved for use as a primary key. Its value must be unique in the collection, is immutable, and may be of any type other than an array or regex. As this field is always indexed, it is the natural choice to hold keys.
The value will be held simply in a field called "value". It can contain any valid BSON type.
Example key value pair: {"_id": "foo", "value": "bar"}.