Bug 563960

Summary: The Search Simplified syntax on page browseResources.xhtml page is not yet working
Product: [Other] RHQ Project Reporter: John Sefler <jsefler>
Component: Core UIAssignee: Joseph Marques <jmarques>
Status: CLOSED CURRENTRELEASE QA Contact: Sunil Kondkar <skondkar>
Severity: medium Docs Contact:
Priority: high    
Version: 1.4CC: cwelton, jmarques, jweiss
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://auto-rhq.usersys.redhat.com:7080/rhq/inventory/browseResources.xhtml?subtab=all
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:56:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 582799    
Bug Blocks: 565628, 577853, 591531    

Description John Sefler 2010-02-11 16:30:40 UTC
Description of problem:
The following search is not returning any results:
type= "JBossAS Server" and plugin= "JBoss Application Server"


Version-Release number of selected component (if applicable):
master builds on 2/11/2010


Steps:
1. navigate to Resources > All Resources
2. Search: type= "JBossAS Server" and plugin= "JBoss Application Server" GO

Expected the existing resources whose Type and Plugin match the search string to appear in the table.

Comment 1 wes hayutin 2010-02-16 16:55:53 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug

Comment 2 wes hayutin 2010-02-16 17:01:01 UTC
making sure we're not missing any bugs in rhq_triage

Comment 3 John Sefler 2010-04-16 19:01:03 UTC
To accommodate automated legacy tests, we need searches like the following to work:

type=="JBossAS Server" and plugin=="JBossAS"

== indicates EXACT match to avoid substring hits on JBossAS5

Comment 4 Joseph Marques 2010-04-16 19:10:05 UTC
gotcha, you want exact-matching instead of substring-matching.  will the following query work in the meantime for you

type=="JBossAS Server" and plugin!=jbossas5

this will find jboss servers that aren't defined by the JBossAS5 plugin, which resolves to the jboss servers defined in the JBossAS plugin (because those are the only two plugins that define jboss servers)

Comment 5 Joseph Marques 2010-05-21 23:12:39 UTC
Committed a fix for this earlier this month.  You can now use regex-like tokens in the following way:

type="foo" // translates to substring match for '%foo%'
type="^foo" // translates to startsWith match for 'foo%'
type="foo$" // translates to endsWith match for '%foo'
type="^foo$" // translates to exact match for 'foo'

Notice that the '^' and '$' tokens are NOT mutually exclusive with the operators, which means that you can still have positive/negative, case-sensitive/insensitive matching separate from substring/startsWith/endsWith/exact matching.

Comment 6 Sunil Kondkar 2010-05-27 09:54:56 UTC
Verified on Jon build170 (Revision: 10621)

Below search criteria using regex works as expected:
name=^jboss
type="jvm"
type="jvm$"
plugin="^jbossas$"

Below search criteria works:

type="jbossas server"  plugin="jbossas"
type=="JBossAS Server" plugin=="JBossAS"

However when following search criteria using operator 'and' is entered, is not returning any results:

type="jbossas server" and plugin="jbossas"
type=="JBossAS Server" and plugin=="JBossAS"

Comment 7 Joseph Marques 2010-05-27 11:09:57 UTC
the "and" operator is implied, and thus not required.  i suppose i could just ignore it, but currently i don't.  if you remove the "and" token, the search should return results correctly.  there's obviously some error handling that still needs to be added, to indicate to users what might be wrong with their search expressions.

Comment 8 Joseph Marques 2010-05-27 11:12:16 UTC
the "and" operator is implied, and thus not required.  i suppose i could just ignore it, but currently i don't.  if you remove the "and" token, the search should return results correctly.  there's obviously some error handling that still needs to be added, to indicate to users what might be wrong with their search expressions.

Comment 9 Sunil Kondkar 2010-05-27 11:23:23 UTC
Verified on jon build170 (Revision: 10621)

Search returns results correctly without the 'and' token.

type="jbossas server"  plugin="jbossas"
type=="JBossAS Server" plugin=="JBossAS"

Comment 10 Corey Welton 2010-08-12 16:56:00 UTC
Mass-closure of verified bugs against JON.