Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 610155 - Search: relaxed suggestion matching, do not show "empty" suggestions
Search: relaxed suggestion matching, do not show "empty" suggestions
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: SearchBar (Show other bugs)
3.0.0
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: Joseph Marques
John Sanda
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-01 12:22 EDT by Joseph Marques
Modified: 2010-08-12 12:45 EDT (History)
2 users (show)

See Also:
Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 12:45:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joseph Marques 2010-07-01 12:22:05 EDT
Type: trait[alias

Suggest: trait[aliases]
Suggest: trait[jboss.web:type=Host,host=%name%:aliases]

Type: trait[aliases]=

Suggest: "[]"

Type Type: trait[aliases]="[]"

Results: <empty>

-----

So the "[]" value was suggested even though there are no results with "[]" as the value for the "aliases" trait.  In this case, the "[]" is only a valid suggestion for the <jboss.web:type=Host,host=%name%:aliases> trait.

Suggested enhancement is two-fold:

1) By default, provide substring matching for the bracketed parameter:

So "trait[aliases]"
Translates to "LOWER(schedule.definition.name) LIKE '%aliases%'"
Instead of "schedule.definition.name = 'aliases'"

But then we should also support the boundary matching (startsWith, endsWith, and exact) the same as we do for values on the right-hand side of the comparison operator.  So if the user wants to perform more precise matches, they could add additional boundary qualifiers:

trait[^aliases] --> "LOWER(schedule.definition.name) LIKE 'aliases%'"
trait[aliases$] --> "LOWER(schedule.definition.name) LIKE '%aliases'"
trait[^aliases$] --> "LOWER(schedule.definition.name) LIKE 'aliases'"

2) Do not provide suggestions which have no results.  In this case, if the user types "trait[^aliases$]", and if we know that there aren't any resources in the system with a value for that exact trait name, then it shouldn't be suggested in the first place.  However, this case will be MUCH more uncommon once #1 is implemented above, and all bracketed-parameter searches become relaxed.  Thus, I suggest we first tackle #1, and then revisit #2 only if the user interaction still feels awkward.
Comment 1 Joseph Marques 2010-07-09 08:08:07 EDT
commit 86e7669b628a750989a344e05dfe3e37b884f254
Author: Joseph Marques <joseph@redhat.com>
Date:   Thu Jul 8 18:45:57 2010 -0400

BZ-610155: relax suggestion matching, suppress "empty" results
    
* only suggest plugin configuration param names for inventoried resources
* only suggest resource configuration param names for inventoried resources
* only suggest trait names for inventoried resources

* only suggest type values for inventoried resources
* only suggest plugin values for inventoried resources
* only suggest plugin configuration values for inventoried resources with the specific plugin configuration param name, case-insensitively (relaxed)
* only suggest resourceplugin configuration values for inventoried resources with the specific resourceplugin configuration param name, case-insensitively (relaxed)
* only suggest trait values for inventoried resources with the specific trait param name, case-insensitively (relaxed)

* only suggest type values for visible groups in inventory
* only suggest plugin values for visible groups in inventory
Comment 2 Corey Welton 2010-07-26 14:41:58 EDT
QA Verified.  Only appropriate values are offered for appropriate, corresponding resources;  if there are no valid suggestions, given a specified string, no "bad" suggestions are offered on said bad string.
Comment 3 Corey Welton 2010-08-12 12:45:33 EDT
Mass-closure of verified bugs against JON.

Note You need to log in before you can comment on or make changes to this bug.