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

fix: Make QGramIndex use less memory; add docs; fix bug #471

Merged
merged 1 commit into from Feb 8, 2022

Commits on Dec 2, 2021

  1. fix: Make QGramIndex use less memory; fix bug; improve tests&docs

    I've added some more documentation and clarifying tests to `QGramIndex`,
    so that the implementation is more clear without looking at the code.
    
    I found one small bug: q-grams of value `0` (i.e. `AAA`) wouldn't be
    filtered by `max_count`. I've added a test that would fail if the
    `.skip(1)` was still there.
    
    The size of the `pos` vector was always `|text|`, but it's sufficient to
    only allocate memory for the number of unfiltered q-grams. Please verify
    this. I've added a `text="AAAAA"`, `pattern="AAA"` test that should show
    that things are still working.
    RagnarGrootKoerkamp committed Dec 2, 2021
    Copy the full SHA
    adb363a View commit details
    Browse the repository at this point in the history