Skip to content

Commit

Permalink
Fix a search pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdzumair committed Nov 2, 2024
1 parent 4d96ae8 commit 291c51b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions db/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,9 @@ async def process_search_query(
]

# Execute the aggregation pipeline
search_results = await MediaFusionMetaData.aggregate(pipeline).to_list(50)
search_results = (
await MediaFusionMetaData.get_motor_collection().aggregate(pipeline).to_list(50)
)

return {"metas": search_results}

Expand Down Expand Up @@ -912,7 +914,9 @@ async def process_tv_search_query(search_query: str, namespace: str) -> dict:
]

# Execute the aggregation pipeline
search_results = await MediaFusionMetaData.aggregate(pipeline).to_list(50)
search_results = (
await MediaFusionMetaData.get_motor_collection().aggregate(pipeline).to_list(50)
)

return {"metas": search_results}

Expand Down

0 comments on commit 291c51b

Please sign in to comment.