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

Fixed intersectMany function #160

Merged
merged 5 commits into from
Oct 21, 2022
Merged

Conversation

matteoscaramuzza
Copy link
Contributor

This change fixes issue #159.
The previous intersectMany method was not finding the correct occurrences.

This change fixes issue oramasearch#159.
The previous intersectMany method was not finding the correct occurrences.
@micheleriva
Copy link
Member

This is good, thank you so much!
Would you mind adding some tests so we make sure we're catching the right occurrences at this point?

Thanks!

@matteoscaramuzza
Copy link
Contributor Author

Done 👍🏻

Let me know if you need anything else.

Grazie!

Copy link
Member

@micheleriva micheleriva left a comment

Choose a reason for hiding this comment

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

Left a couple of comments, could you please add tests on array intersection specifically?
Something like:

const arr1 = [1,2,3]
const arr2 = [2,3,4]

const intersection = intersectMany(arr1, arr2) // 2,3

thanks!

tests/lyra.dataset.test.ts Outdated Show resolved Hide resolved
tests/lyra.dataset.test.ts Outdated Show resolved Hide resolved
@matteoscaramuzza
Copy link
Contributor Author

I've just added the requested test.
I've also create the type alias and put it inside the datasets folder.

thanks!

Copy link
Member

@micheleriva micheleriva left a comment

Choose a reason for hiding this comment

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

I left a couple of comments, remember to run the linter before committing 🙂

Thanks again!

tests/datasets/event-json.ts Outdated Show resolved Hide resolved
tests/utils.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@micheleriva micheleriva left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

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