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

HalfSmartSearch #2161

Closed
dhcmega opened this issue Aug 29, 2019 · 3 comments · Fixed by #2163
Closed

HalfSmartSearch #2161

dhcmega opened this issue Aug 29, 2019 · 3 comments · Fixed by #2163

Comments

@dhcmega
Copy link

dhcmega commented Aug 29, 2019

Hi!
I think the smart search is very useful for searching. The problem is that starting the search string with % skips indexes.
I would like to have a second method, like this:

        if ($this->config->isSmartSearch()) {
            $keyword = "%$keyword%";
        }

        if ($this->config->isHalfSmartSearch()) {
            $keyword = "$keyword%";
        }

Is it possible without changing code? Will I have to override too many things?

@yajra
Copy link
Owner

yajra commented Aug 30, 2019

The idea makes sense and is possible. Maybe not halfSmartSearch but startsWithSearch search?

Will try to implement this when I got the chance, but if you can, please do not hesitate to submit a PR. Thanks!

@yajra
Copy link
Owner

yajra commented Aug 30, 2019

There, sent a PR. Kindly check and provide some feedbacks. Thanks!

@dhcmega
Copy link
Author

dhcmega commented Aug 30, 2019

Sure, thank you! I'm testing it and works perfectly.
I will keep testing during the day.
Thanks again.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants