MongoDB is a NoSQL , document-oriented database that supports JSON-like documents with a dynamic schema.
OverviewThe MongoDB Document Loader returns a list of Langchain Documents from a MongoDB database.
The Loader requires the following parameters:
The output takes the following format:
import nest_asyncio
nest_asyncio.apply()
from langchain_community.document_loaders.mongodb import MongodbLoader
loader = MongodbLoader(
connection_string="mongodb://localhost:27017/",
db_name="sample_restaurants",
collection_name="restaurants",
filter_criteria={"borough": "Bronx", "cuisine": "Bakery"},
field_names=["name", "address"],
)
docs = loader.load()
len(docs)
Document(page_content="Morris Park Bake Shop {'building': '1007', 'coord': [-73.856077, 40.848447], 'street': 'Morris Park Ave', 'zipcode': '10462'}", metadata={'database': 'sample_restaurants', 'collection': 'restaurants'})
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4