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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuceneIndexingService in Gallery should take into account IsLatest(Stable)SemVer2 #3863

Merged
merged 2 commits into from
May 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be update the comment above as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with ce9a0a5

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