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

Make MIN_WORD_PREFIX_SIZE configurable #1534

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hannahbast
Copy link
Member

@hannahbast hannahbast commented Oct 1, 2024

So far, the MIN_WORD_PREFIX_SIZE was not only hard-coded in src/global/Constants.h, but there was also code in src/index/IndexImpl.Text.cpp that only worked for the hard-coded value. The latter code is now generic.

TODO: Expand test + make MIN_WORD_PREFIX_SIZE configurable from the command line.

Co-authored-by: Julian Mundhahs [email protected]

So far, the `MIN_WORD_PREFIX_SIZE` was not only hard-coded in
`src/global/Constants.h`, but there was also code in
`src/index/IndexImpl.Text.cpp` that only worked for the hard-coded
value. The latter code is now generic.

TODO: Make `MIN_WORD_PREFIX_SIZE` configurable from the command line.

Joint work with @Qup42
@hannahbast hannahbast requested a review from joka921 October 1, 2024 15:24
@hannahbast hannahbast marked this pull request as draft October 1, 2024 15:27
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.18%. Comparing base (996315f) to head (c2c9a1e).

Files with missing lines Patch % Lines
src/index/IndexImpl.Text.cpp 94.73% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1534      +/-   ##
==========================================
- Coverage   88.18%   88.18%   -0.01%     
==========================================
  Files         359      359              
  Lines       27061    27064       +3     
  Branches     3655     3653       -2     
==========================================
+ Hits        23865    23867       +2     
  Misses       1951     1951              
- Partials     1245     1246       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarqubecloud bot commented Oct 1, 2024

Comment on lines +495 to +496
if (std::all_of(prefix.begin(), prefix.end(),
[firstChar](char c) { return c == firstChar; })) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (std::all_of(prefix.begin(), prefix.end(),
[firstChar](char c) { return c == firstChar; })) {
if (std::ranges::all_of(prefix,
[firstChar](char c) { return c == firstChar; })) {

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