-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Suggestion issue fixed (#4175) #4202
Suggestion issue fixed (#4175) #4202
Conversation
@esakkiraja100116 Thanks for the error analysis. |
Because the words between the \ cannot be found either. |
Thanks for offering this @esakkiraja100116. You're on the right lines but the PR code does not fix the issue at play here.
Yeah, the existing behaviour is intentional. Normal search terms are prefix-only match (at a term-level), not a full partial contains match. This is so database indexes can be used for most search operations. Some other things upon the above:
@esakkiraja100116 Finding |
As @ssddanbrown said we can able to filter the word using double quote like But my concern is like something below
|
Thanks for updating the PR @esakkiraja100116 but I think this is still not working as intended, now adding more issues. It now seems to be doubling the whole search term whenever it contains a Ultimately, I think the logic simply requires |
|
@ssddanbrown Have you checked my recent commit ?
|
Thanks for updating the code again @esakkiraja100116. |
Really happy to contribute with Book Stack and thanks for your guidance @ssddanbrown 🙏 |
\
we need to give four\\\
. Then only it will consider like only one.Came back to the code
$inputTerm = ($inputTerm == "\\") ? str_repeat($inputTerm, 2) : $inputTerm;
Added condition for that backslash, then it worked.
stack
and the actual word wasBookstack
. So I modified that query in PHP.$query->orWhere('term', 'like', $inputTerm. '%');
to$query->orWhere('term', 'like', "%$inputTerm%");
Finally, the issues are resolved 🎉