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

Ordering of sanction check matches. #867

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Conversation

apognu
Copy link
Contributor

@apognu apognu commented Feb 20, 2025

They are now ordered according to the following criteria:

  • Confirmed hit first, then pending, then no match, then skipped
  • Within those groups, higher scores are returned first

They are now ordered according to the following criteria:

 - Confirmed hit first, then pending, then no match, then skipped
 - Within those groups, higher scores are returned first
@apognu apognu added bug Something isn't working enhancement New feature or request labels Feb 20, 2025
@apognu apognu self-assigned this Feb 20, 2025
@apognu
Copy link
Contributor Author

apognu commented Feb 20, 2025

A question could be asked about performance, but the filtered set should always be only a few dozen matches at most and fit in memory, so the ordering and JSONB extraction should not have a noticeable impact on performance.

Open to discussion.

Copy link
Contributor

@Pascal-Delange Pascal-Delange left a comment

Choose a reason for hiding this comment

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

I learned something here, I didn't know the array_position function
logic makes sense to me 👍

@apognu apognu merged commit 7b183f8 into main Feb 20, 2025
3 checks passed
@apognu apognu deleted the fix/sanctions/match-ordering branch February 20, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants