Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 backported "Add collection.effective_ancestors to model search results" #41920

Merged

Commits on May 16, 2024

  1. Add collection.effective_ancestors to model search results (#41746)

    * Add `collection.effective_ancestors` to search
    
    Fixes #41909
    
    The ultimate goal here is to be able to display a UI that showed the entire (effective) path to each collection.
    
    This was a bit more painful than I'd hoped. The primary issue is that we
    tied two things together:
    
    - scoring results
    
    - "serializing" results (really, partially serializing results, because
    we do more work to shape the data later)
    
    Why is this a problem? The `top-scorers` function took a transducer and
    returned the *serialized* top scorers. Later, when we need to operate
    on *all* the top results (in this case, to collect all the collection
    IDs and names that we know of), we're looking at the serialized results.
    
    In our case, we needed some data (collection location) that wasn't
    included after serialization. We could add it, of course, but it's
    frustrating to need to change the API of what data is *returned* from
    the endpoint for purely internal purposes (changing the data available
    during *processing*).
    
    I ended up pulling serialization out of the scoring function. At some
    point down the road, we should go ahead and move the `serialize`
    function out of the `search.scoring` namespace entirely - there's really
    no reason for it to belong there as far as I can tell.
    johnswanson committed May 16, 2024
    Configuration menu
    Copy the full SHA
    4a97625 View commit details
    Browse the repository at this point in the history