1. A computer-implemented method, the method comprising: determining, by a computing device based on a query, a plurality of content items including a first content item and a second content item; categorizing, by the computing device, the plurality of content items into a hierarchical set of groups including a first group and a second group; sorting, by the computing device, content items categorized in the first group based on a corresponding popularity value of each content item categorized in the first group; and after sorting the content items categorized in the first group, generating, by the computing device, a ranked list of content items by ordering the content items belonging to the first group higher in the ranked list than content items belonging to the second group.