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

Improve use of generics in DisjunctionDISIApproximation construction #14095

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

ChrisHegarty
Copy link
Contributor

This is a small usability improvement which avoids the need to copy the DisiWrappers collection during the construction of a DisjunctionDISIApproximation just to satisfy generic constraints. Follows PECS.

Allows usage similar to:

List<MyDisiWrapper> wrappers = new ArrayList<>();
for (Scorer scorer : ..) {
  wrappers.add(new MyDisiWrapper(scorer, ..));
}
this.approximation = new DisjunctionDISIApproximation(wrappers, Long.MAX_VALUE);

relates #14052

@ChrisHegarty ChrisHegarty requested a review from jpountz January 2, 2025 11:18
@ChrisHegarty ChrisHegarty merged commit 3a198e2 into apache:main Jan 2, 2025
5 checks passed
@ChrisHegarty ChrisHegarty deleted the ddisia branch January 2, 2025 11:56
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