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

Fixes #1482: Correct number of matched entries is displayed for refining subgroups #1483

Merged
merged 1 commit into from
Jun 14, 2016

Conversation

tobiasdiez
Copy link
Member

@tobiasdiez tobiasdiez commented Jun 6, 2016

The issue was that, for the number of hits, JabRef only checked if the
group taken separately matched the entry. That is, it was completely
ignored that the group sits in a tree and might be set up to refine the
search of the parent. Taking the example given in #1482, 577 entries
satisfy the condition articlé original but only 38 are also matched by
articlé.

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)

… refining subgroups

The issue was that, for the number of hits, JabRef only checks if the
group taken separately matches the entry. That is, it is completely
ignored that the group sits in a tree and might be set up to refine the
search of the parent. Taking the example given in JabRef#1482, 577 entries
satisfy the condition `articlé original` but only 38 are also matched by
`articlé`.
@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 6, 2016
@koppor
Copy link
Member

koppor commented Jun 6, 2016

LGTM 👍

assertEquals(2, node.numberOfHits(entries));
}

// Test for #1482
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary comment in my opinion. Doesn't matter for which issue this test is. The test covers the old problem.

@stefan-kolb
Copy link
Member

LGTM 👍

}
}
return hits;
}
Copy link
Contributor

@simonharrer simonharrer Jun 7, 2016

Choose a reason for hiding this comment

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

Why is this moved? I think it fits more into the group itself which carries around the search rule. Maybe this should even be moved to a search matcher?

Copy link
Member Author

Choose a reason for hiding this comment

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

The (Abstract)Group does not know where it is sitting in the group tree but the GroupTreeNode does. But the position in the tree might influence the search result (since we support refining / independent / ... search modes)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok, the getSearchRule is automatically adjusting to the position in the group tree? Then this make sense.

@simonharrer
Copy link
Contributor

LGTM

@stefan-kolb
Copy link
Member

Ok, let's merge this in 😄 👍

@stefan-kolb stefan-kolb added this to the 3.4.1 milestone Jun 12, 2016
@stefan-kolb stefan-kolb merged commit 16097e4 into JabRef:master Jun 14, 2016
@tobiasdiez tobiasdiez deleted the fix1482 branch June 20, 2016 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants