No Code Attached Yet bug
avatar Paladin
Paladin
28 Jan 2020

Steps to reproduce the issue

Case A

  1. open a com_finder search page
  2. search for two terms, first being a boolean, such as “not connected” (no quotes in actual search)

Case B

  1. as above
  2. put quotes around the Boolean term to escape it

Expected result

Case A : would expect all pages containing the words ‘not’ and ‘connected’
Alternate A: empty set.

Case B: would expect to avoid the alternate result from A and get the pages containing both ‘not’ and ‘connected’.

Actual result

Case A: got the alternate result. Suboptimal, but understandable.
Case B: got all the pages containing ‘not’, excluding the pages that also contain ‘connected’.

System information (as much as possible)

3.9.14 Joomla PHP 7.3

Additional comments

It looks like it’s successfully escaping the boolean during the search, but then reinstates it to exclude. It should maintain the escape or never allow it. The hybrid is too confusing to the user. A better approach might be to only take the Boolean meaning of the term if it’s in caps, let lowercase search for the term just like any other word.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar Paladin Paladin - open - 28 Jan 2020
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jan 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Jan 2020
avatar richard67
richard67 - comment - 29 Jan 2020

Ping @Hackwar

avatar jwaisner
jwaisner - comment - 21 Feb 2020

@Hackwar Do you have any feedback for this?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27691.

avatar Hackwar
Hackwar - comment - 2 Feb 2022

See? Just 2 years later and I'm reacting to your ping... 😉 Yes, this looks wrong and since nobody touched that code yet, it should also still be valid. To be honest, the proper solution would most likely be to have a switch to enable this advanced search feature or to simply search for the string, maybe with the later being the default.

Expected behavior for such a feature:
Simple Search (default): The search term is searched for literally, no operators.
Advanced Search: The search term is interpreted and boolean operators are handled properly. Boolean operators inside a quoted string are used literally and not as operators.

I'll try to implement that in the coming weeks.

avatar Hackwar Hackwar - change - 21 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 21 Feb 2023

Add a Comment

Login with GitHub to post a comment