Uploaded image for project: 'Python Integrations'
  1. Python Integrations
  2. INTPYTHON-540

Revisit pipelines.text_search_stage as it is not flexible

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: langchain-mongodb-0.5
    • Component/s: AI/ML, LangChain
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Our first implementation is too simple for realistic use cases.  We wanted to make something simple to adopt so that new LangChain users wouldn't be dissuaded but users of Hybrid today need complexity.

      I had a conversation about the with erik.hatcher@mongodb.com who would consult on the API and best practices.

      I am thinking that ripping out "text": {"query": query, "path": search_field} and replacing with "compound":query,  makes sense because it allows arbitrary complexity. This is the only way that I see in the docs that I can apply a filter through $search. I also don't see where to limit the results of $search. Another big issue is currently a $match after $search, and this opens up a nightmare performance scenario. 

      Definition of done

      TBD - 

      Pitfalls

      This is a breaking change.

            Assignee:
            Unassigned Unassigned
            Reporter:
            casey.clements@mongodb.com Casey Clements
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None