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

Fix Duplicates in Fuzzy Search #938

Merged
merged 1 commit into from Mar 8, 2016

Conversation

Projects
None yet
2 participants
@Calvinp
Contributor

Calvinp commented Mar 7, 2016

Fuzzy Search gave duplicates in certain situations. This is because there are two searches done, one based on task id and one based on host. Fuzzy returns an object containing the string it searched on. If both the task id and host match the filter, two non-equal fuzzy objects representing the same task are returned, and _.union doesn't see them as the same thing.

This fixes that problem by calling _.uniq after extracting the original object.

@Calvinp

This comment has been minimized.

Show comment
Hide comment
@Calvinp

Calvinp Mar 7, 2016

Contributor

The duplicate 'p' in the branch name was a typo, though I wish it was an intentional pun.

Contributor

Calvinp commented Mar 7, 2016

The duplicate 'p' in the branch name was a typo, though I wish it was an intentional pun.

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Mar 8, 2016

Member

Thanks for the fix @Calvinp , LGTM

Member

ssalinas commented Mar 8, 2016

Thanks for the fix @Calvinp , LGTM

ssalinas added a commit that referenced this pull request Mar 8, 2016

@ssalinas ssalinas merged commit 04a9115 into master Mar 8, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssalinas ssalinas deleted the fuzzy-search-dupplicates branch Mar 8, 2016

@ssalinas ssalinas modified the milestone: 0.4.12 Apr 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment