Bug 1115316

Summary: searching for partial product name is not functional
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: WebUIAssignee: David Davis <daviddavis>
WebUI sub component: Katello QA Contact: Katello QA List <katello-qa-list>
Status: CLOSED NOTABUG Docs Contact:
Severity: medium    
Priority: unspecified CC: bbuckingham
Version: 6.0.3Keywords: Reopened, Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-24 13:27:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Hutař 2014-07-02 08:10:29 UTC
Description of problem:
Searching for partial product name is not functional


Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140626.1


How reproducible:
always


Steps to Reproduce:
1. Create a custom product "RHEL" and repository in it
2. Sync Red Hat repo "Red Hat Enterprise Linux Server"
3. Try to search custom product:
   Content -> Products -> search: "RHE" (missing "L")
4. Try to search Red Hat product:
   Content -> Products -> search: "Red" (missing majority of name)


Actual results:
No product is shown


Expected results:
In both cases products should be filtered as it seems more useful behavior


Additional info:
==> /var/log/foreman/production.log <==
Processing by Katello::Api::V2::ProductsController#index as JSON
  Parameters: {"enabled"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "search"=>"Red", "sort_by"=>"name", "sort_order"=>"ASC", "api_version"=>"v2"}
  Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/products/index.json.rabl within katello/api/v2/layouts/collection (3.5ms)
Completed 200 OK in 44ms (Views: 5.3ms | ActiveRecord: 2.0ms)

Comment 1 Jan Hutař 2014-07-02 08:11:06 UTC
Also reported possibly related bug 1115315

Comment 3 David Davis 2014-07-22 17:44:12 UTC
We've always used Lucene syntax which requires wildcards. So in your case, you'd search by RHE* or Red*.

That said, it's not apparent how to do partial searches so I think we should at least include some search information in the UI. I've created a bug for this:

https://bugzilla.redhat.com/show_bug.cgi?id=1122185

Comment 4 Jan Hutař 2014-07-22 20:41:34 UTC
Hello. This way it is not consistent with rest of the product. E.g. when you use "RHE" to search through provisioning templates, one of templates you will get is "Kickstart RHEL default". I do understand that we are touching Katello vs. Foreman difference, but for Satellite product I do expect consistent behavior.

Comment 5 David Davis 2014-07-24 13:27:01 UTC
Jan, that's one of the options I outline in https://bugzilla.redhat.com/show_bug.cgi?id=1122185#c3.