Description of problem: Products filter/search doesn't seem to search for Red Hat repositories 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: "RHEL" 4. Try to search Red Hat product: Content -> Products -> search: "Red Hat Enterprise Linux Server" Actual results: In step 3. "RHEL" product is correctly filtered. In step 4. "Red Hat Enterprise Linux Server" product is not shown. Expected results: In both cases given products should be shown Additional info: Processing by Katello::Api::V2::ProductsController#index as JSON Parameters: {"enabled"=>"true", "organization_id"=>"1", "page"=>"1", "paged"=>"true", "search"=>"Red Hat Enterprise Linux Server", "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.1ms) Completed 200 OK in 38ms (Views: 4.7ms | ActiveRecord: 1.8ms)
Also reported possibly related bug 1115316
Definitely a bug. I think it's because of the spaces in the search string.
So it looks like we're using a keyword tokenizer where the data is being treated as one value but the search string is broken up by whitespace. You can get around this by using double quotes (ie "Red Hat Enterprise Linux Server") or a slash (eg Red\ Hat\ Enterprise\ Linux\ Server). You can even be more specific with fields as well (ie name:"Red Hat Enterprise Linux Server"). It would require some work but we could change all our fields so they would tokenize the input and search on the different tokens (ie use the standard tokenizer instead of the keyword tokenizer). However, this would also require reworking the CLI to use a separate field as the UI and CLI are using the same search. I think this time is probably better spent towards: https://bugzilla.redhat.com/show_bug.cgi?id=1122972
RELEASE NOTE: In order to search product names in the Content Search user interface the user must either double-quote the name of the product: "Red Hat Enterprise Linux Server" or escape the spaces: Red\ Hat\ Enterprise\ Linux\ Server
(In reply to David Davis from comment #4) > I think this time is probably better spent towards: > > https://bugzilla.redhat.com/show_bug.cgi?id=1122972 Yep, I would not object to close this as a duplicate of this bug in case this use case is brought to it for QE to verify once that is fixed. On the other hand in comment #5 there is a useful release note now so closing this bug is probably not a good idea.
davido, adding you to this bug as it should be included in the release notes.
In Satellite 6.2, enhancements were made to replace the existing 'elasticsearch' (which utilized lucene search syntax) support with 'scoped_search'. With this change, searching for either of the strings below will return the expected result: RHEL Red Hat Enterprise Linux Server Moving to ON_QA for verification.
Verified in Satellite 6.2 Beta Snap 12. As mentioned in Comment #10, we no longer have to surround a name that includes white space with quotes. All of the searches below worked correctly. Red Hat Hat Enterprise Enterprise Linux Red Server
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501