]> git.deb.at Git - deb/packages.git/commit - bin/parse-packages
Improve result sampling in case we have too generic keywords
authorFrank Lichtenheld <frank@lichtenheld.de>
Fri, 1 Feb 2008 00:45:41 +0000 (01:45 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Fri, 1 Feb 2008 00:45:41 +0000 (01:45 +0100)
commitb84419b2f87cf3c43b83fca71486be4fae81375e
tree43077cc10a2ff772e3972230b0f96d36186c067c
parent341c0741707bd5c33699e266e1bb8aa7d20fbb85
Improve result sampling in case we have too generic keywords

Instead of either displaying the exact match if we have only
one keyword and nothing otherwise, lets try to give people
a sample of results, on the chance that might still be useful.

Mostly just display the first 100 package names found (i.e.
from suffix entries that had no "too many prefixes" value).
Allow suffix entries with "too many prefixes" value to specifiy
if the empty prefix was contained in the set (that effectivly
avoids a regression in the case "single keyword, exact match
exists").

If in doubt, prefer package names that begin with the first
keyword and only abort if we have more than 100 of those
(The worst case behaviour of this should be very limited
to due the "too many prefixes" constraints).
bin/parse-packages
lib/Packages/Search.pm