Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-104552

Factor out $rankFusion weights validation and extraction logic into hybrid search util

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      $rankFusion has its own extractAndValidateWeights method, which does everything regarding extracting and validating the weights object that we would like to do in $scoreFusion (like weights typo suggestion).

       

      Factor this out into the document_source_hybrid_scoring_util.cpp/h file for reuse in $scoreFusion.

       

      This logic is currently tied to a RankFusionSpec, so some rethinking of what the arguments to the shared utility function should be must be done. Fundamentally, both $rankFusion and $scoreFusion have named input pipelines and named weights arguments that need to be matched up, so some layer of commonality is possible. We may even want to consider commonizing a substructure in IDL between the RankFusionSpec and ScoreFusionSpec to pass into these utility functions.

            Assignee:
            adithi.raghavan@mongodb.com Adithi Raghavan
            Reporter:
            joseph.shalabi@mongodb.com Joe Shalabi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: