Skip to content

Commit

Permalink
LuceneIndexingService in Gallery should take into account IsLatest(St…
Browse files Browse the repository at this point in the history
…able)SemVer2 (#3863)
  • Loading branch information
xavierdecoster committed May 17, 2017
1 parent e9e3810 commit e19370f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ private List<PackageIndexEntity> GetPackages(DateTime? lastIndexTime)

if (lastIndexTime.HasValue)
{
// Retrieve the Latest and LatestStable version of packages if any package for that registration changed since we last updated the index.
// Retrieve the Latest, LatestStable, LatestSemVer2 and LatestStableSemVer2 version of packages if any package for that registration changed since we last updated the index.
// We need to do this because some attributes that we index such as DownloadCount are values in the PackageRegistration table that may
// update independent of the package.
set = set.Where(
p => (p.IsLatest || p.IsLatestStable) &&
p => (p.IsLatest || p.IsLatestStable || p.IsLatestSemVer2 || p.IsLatestStableSemVer2) &&
p.PackageRegistration.Packages.Any(p2 => p2.LastUpdated > lastIndexTime));
}
else
{
set = set.Where(p => p.IsLatest || p.IsLatestStable); // which implies that p.IsListed by the way!
set = set.Where(p => p.IsLatest || p.IsLatestStable || p.IsLatestSemVer2 || p.IsLatestStableSemVer2); // which implies that p.IsListed by the way!
}

var list = set
Expand Down

0 comments on commit e19370f

Please sign in to comment.