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

Add 'isLatest' field to reduce array-contains uses #1364

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

justinfagnani
Copy link
Collaborator

This denormalizes the 'latest' dist-tag to an isLatest field on PackageVersion and CustomElement. 'latest' will by far be the most common dist-tag to search for and this will be marginally more efficient, but more importantly it will make other queries that rely on array-contains, like full-text search, easier.

Part of #1363

Copy link
Contributor

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

Test?

@justinfagnani justinfagnani self-assigned this Oct 13, 2022
@justinfagnani
Copy link
Collaborator Author

This doesn't change behavior and is covered on existing tests. It's searching via other dist-tags that doesn't have coverage yet.

@justinfagnani justinfagnani merged commit c63cb32 into main Oct 13, 2022
@justinfagnani justinfagnani deleted the latest-field branch October 13, 2022 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants