Skip to main content

Code

mongo_db_hybrid_search.py

Usage

1

Set up your virtual environment

2

Install dependencies

3

Run MongoDB

4

Create the keyword search index

Hybrid search requires a keyword Search index named default in addition to the vector index Agno creates. Wait for MongoDB, create the collection if needed, then create the index and wait until it is queryable:
5

Set environment variables

6

Run Agent