text_search_stage#
- langchain_mongodb.pipelines.text_search_stage(query: str, search_field: str, index_name: str, limit: int | None = None, filter: Dict[str, Any] | None = None, include_scores: bool | None = True, **kwargs: Any) List[Dict[str, Any]] [source]#
Full-Text search using Luceneβs standard (BM25) analyzer
- Parameters:
query (str) β Input text to search for
search_field (str) β Field in Collection that will be searched
index_name (str) β Atlas Search Index name
limit (int | None) β Maximum number of documents to return. Default of no limit
filter (Dict[str, Any] | None) β Any MQL match expression comparing an indexed field
include_scores (bool | None) β Scores provide measure of relative relevance
kwargs (Any)
- Returns:
Dictionary defining the $search stage
- Return type:
List[Dict[str, Any]]