final_hybrid_stage#

langchain_mongodb.pipelines.final_hybrid_stage(scores_fields: List[str], limit: int, **kwargs: Any) List[Dict[str, Any]][source]#

Sum weighted scores, sort, and apply limit.

Parameters:
  • scores_fields (List[str]) – List of fields given to scores of vector and text searches

  • limit (int) – Number of documents to return

  • kwargs (Any)

Returns:

Final aggregation stages

Return type:

List[Dict[str, Any]]