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

InMemory SearchExtension bug #390

Closed
Jordy84 opened this issue Mar 15, 2024 · 3 comments · Fixed by #391
Closed

InMemory SearchExtension bug #390

Jordy84 opened this issue Mar 15, 2024 · 3 comments · Fixed by #391
Labels
bug Something isn't working

Comments

@Jordy84
Copy link

Jordy84 commented Mar 15, 2024

There is a bug in the SearchExtension class used by the InMemory SearchEvaluator.

When the input string contains the requested pattern, BUT the first character of said pattern is used in the power of 2, the result is false.

Note the amount of 'a' characters in the screenshot

image

@fiseni
Copy link
Collaborator

fiseni commented Mar 15, 2024

Hi @Jordy84,

We're aware that the in-memory implementation might fail in certain edge cases. The Like operator is quite complex, and it lacks standardization across different database providers. So, it's unlikely that we'll ever have 1:1 match in functionality.

But, your case contains quite basic usage, and it's an obvious bug. We must fix it. Thanks for reporting it.

@fiseni fiseni added the bug Something isn't working label Mar 15, 2024
@fiseni
Copy link
Collaborator

fiseni commented Mar 16, 2024

Ok, this turned out to be trickier than I anticipated.
I implemented it using regex (after many trials and errors). It will not be as performant as the previous version, but at least it behaves correctly.

@Jordy84
Copy link
Author

Jordy84 commented Mar 18, 2024

Thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants