Bug 1398699

Summary: dnf search is not user friendly
Product: [Fedora] Fedora Reporter: Honza Brázdil <jbrazdil>
Component: dnfAssignee: rpm-software-management
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: mluscon, mmraka, packaging-team-maint, pnemade, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-28 10:05:49 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:

Description Honza Brázdil 2016-11-25 15:56:48 UTC
Description of problem:
When I do: `dnf search python` requests I get over 5000 lines of output, that I need to scroll through to find what I'm looking for (what was actually just python-requests)

Version-Release number of selected component (if applicable):
1.1.10

How reproducible:
always

Steps to Reproduce:
1. dnf search python requests
2. get your terminal overflowed with text

Actual results:
Over 5000 results with weird ordering and grouping.

Expected results:
List of several most relevant results (max tenths of results), maybe the most relevant at the bottom.

Comment 1 Michael Mráka 2016-11-28 10:05:49 UTC
 dnf search python requests

actually searches for "python or requests". So

 dnf search requests

would gave you (less and) more relevant answers.
The weird ordering is "best match first".
As described above we don't consider current behaviour a bug.

Comment 2 Honza Brázdil 2016-11-28 10:35:42 UTC
So how would one search for "python and requests"?

And if I search e.g. for "python", I get again over 5000 results. I can see that the results are oreded in several 'groups' (I think name&description, name, description) but in each group ordered by length of the matched fields. How is e.g. length of descritpion field linked to relevance?