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

Double-quoted Simple Search term (5.2.1) returns all searchable entries #161

Closed
PaulBaileyAtChan opened this Issue Mar 13, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@PaulBaileyAtChan
Copy link

PaulBaileyAtChan commented Mar 13, 2019

Description of the problem

Submitting a search term to Simple Search enclosed in double-quotes looks like it returns all searchable entries, whether the search term is present or not.

I believe this behaviour appeared in EE4/5. Results for double-quoted searches in EE3 were, so far as I remember, as expected, with the quotes creating a single term from multiple terms.

Using double-quotes to create a single term is the optimal behaviour here, I think. Second-best might be to ignore the quotes and retain multiple terms. But the current behaviour doesn't make sense.

(NB: Behaviour with single-quotes is again different, and might also be folded in to a solution here, but the current behaviour isn't as obviously odd.)

How To Reproduce

{exp:search:simple_form search_in="entries" results="10" status="open" where="all" channel="[mychannels]" result_page="search/index" no_result_page="search/fail"}

Examples:

In my set-up, searching for autism returns 128 results (likely correct). Searching for "autism" returns 1555 results — which looks to be the sum of all searchable entries.

Searching for occupational science returns 493 results (also likely correct). Searching for "occupational science" returns the same 1555 entries.

Similarly, searching for wheelbarrow, which doesn't appear in any content, returns no results. Searching for "wheelbarrow" again returns the 1555 sum of all searchable entries.

Environment Details:

  • Version: 5.2.1
  • PHP Version: 7.0.33
  • MySQL Version: 5.0.12
  • OS: Ubuntu 16.04.2
  • Web Server: Apache 2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.