• Dmitriy Zaporozhets's avatar
    Search results libraries added · 9a4ef7e7
    Dmitriy Zaporozhets authored
    Gitlab::SearchResults and Gitlab::ProjectSearchResults are libraries we
    are going to use to get search results based on query, enitity type and
    pagination.
    
    It will allow us to get only issues from project #23 where title or
    description includes 'foo'.
    
    Ex:
    
    search_results = Gitlab::ProjectSearchResults.new(project.id, 'foo', 'issues')
    
    search_results.objects => # [<Issues #23>, <Issues #34>]
    search_results.issues_count => 2
    search_results.total_count => 12 (it includes results from comments and
    merge requests too)
    Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
    9a4ef7e7
search_results.rb 1.67 KB