• Terri Chu's avatar
    Reduce N+1 queries for Search API commits scope · f85ceac9
    Terri Chu authored
    Add preloading for commits and associated projects
    returned in Elastic Search results.
    
    Two fixes were added:
    
    1. New scope in Project to load required data
    for the commits scope. The scope is passed down
    through the search_results method and used where
    Project preloading was already happening.
    
    2. Use Commitcollection to preload last_pipeline
    and status for each commit.
    f85ceac9
search.rb 4.4 KB