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

feat: Added approximate_spans result mode. #275

Merged
merged 2 commits into from
Sep 20, 2023

Conversation

V0ldek
Copy link
Member

@V0ldek V0ldek commented Sep 20, 2023

Short description

  • Engine can return an approximate span of the match, where "approximate" means the start index is correct, but the end index might include trailing whitespace after the match.
  • This mode is much faster that full matches, close to the performance of count, especially for large result sets.
  • This is a library-only feature.

Issue

Resolves: #242

Checklist

All of these should be ticked off before you submit the PR.

  • I ran just verify locally and it succeeded.
  • Issue was given go ahead and is linked above OR I have included justification for a minor change.
  • Unit tests for my changes are included OR no functionality was changed.

- Engine can return an approximate span of the match,
    where "approximate" means the start index is correct,
    but the end index might include trailing whitespace after the match.
- This mode is much faster that full `matches`, close to the performance
    of `count`, especially for large result sets.
- This is a library-only feature.

Ref: #242
@V0ldek V0ldek merged commit 05ced61 into main Sep 20, 2023
45 checks passed
@V0ldek V0ldek deleted the v0ldek/#242-approximate-spans branch September 20, 2023 12:19
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.

Get the span as a result of a match
2 participants