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

Add "whole word" search option to search's #17751

Closed
N6REJ opened this issue Aug 29, 2017 · 13 comments
Closed

Add "whole word" search option to search's #17751

N6REJ opened this issue Aug 29, 2017 · 13 comments

Comments

@N6REJ
Copy link
Contributor

N6REJ commented Aug 29, 2017

Steps to reproduce the issue

in the "testing" sample set if you search on "bug direct" you'll get partial matches.
in my experience this is rarely the case desired.
I think we should add an option for "Whole word" search instead of just
any, all & exact.

Expected result

Return ONLY matching whole words when set to any &/or all since exact can't be used with multiple SINGLE words.

Actual result

image
partial matches returned.

System information (as much as possible)

systeminfo-2017-08-29T02-34-30+00-00.txt

Additional comments

Looks like the problem starts @ line 103 in content.php for "content plugin"
and near 218 in view.html.php in component.
@nibra and I spent a fair amount of time discussing / tracking this down.

@AlisonAMG
Copy link

And thank you guys so much for looking at this.

@brianteeman
Copy link
Contributor

since exact can't be used with multiple SINGLE words.

why not?

@nibra
Copy link
Member

nibra commented Aug 29, 2017 via email

@brianteeman
Copy link
Contributor

Thanks for the explanation

@brianteeman
Copy link
Contributor

For reference smart search aka com_finder searches for whole words

@N6REJ
Copy link
Contributor Author

N6REJ commented Aug 30, 2017

@brianteeman but sadly the layout is poor. at least with Ajax live search it is. The ultimate question is if smart search does it, why not simple search :P lol
A blog layout is sorely needed imo

@brianteeman
Copy link
Contributor

Sorry but I don't understand your comment

@N6REJ
Copy link
Contributor Author

N6REJ commented Aug 31, 2017

@brianteeman its ok, lets worry about that on another issue/pr
for now lets worry about searchphrase

@tonypartridge
Copy link
Contributor

@nibra can’t we do this with OR statements? If we explode on a space?

@nibra
Copy link
Member

nibra commented May 2, 2018

It is of course possible to add a search query parser. The problem IMO is to make it intuitive to use.
AND (all) and OR (any) are already implemented - they're just not searching for whole words.

@tonypartridge
Copy link
Contributor

tonypartridge commented May 2, 2018 via email

@Hackwar
Copy link
Member

Hackwar commented May 21, 2018

Adding this feature for Joomla 3.x is nearly impossible, mainly because you are requesting a new behavior for com_search, but which at the same time requires all existing search plugins to be modified to support this feature. For Joomla 4.0 I hope to make this unnecessary, too, because we hopefully remove com_search and all related plugins for 4.0. Feel free to help making this possible and improving searching in Joomla by testing these PRs:

@brianteeman
Copy link
Contributor

I did spend quite some time on this but it is virtually impossible for the reasons stated by @Hackwar

If you really need this functionality today in J3 then you will have to use smart-search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants