[aur-general] The search engine needs improvements
Olivier Duclos
olivier.duclos at gmail.com
Sat Jan 10 18:50:45 EST 2009
On Sat, 10 Jan 2009 23:09:39 +0100
Pierre Chapuis <catwell at archlinux.us> wrote:
> Le Sat, 10 Jan 2009 22:55:39 +0100,
> Xavier <shiningxc at gmail.com> a écrit :
>
> > But then again, rar is probably a corner case. I have personally never
> > ran into that problem in all the searches I did on AUR so it is
> > probably not a big deal :)
>
> Ever tried to search vi? :)
> +1 from Just Another User on Xavier's suggestion to do the same as in viewvc.
>
I think it would be a great new feature, but still I think that if we have an exact match, it should be shown first.
I've quickly modified Find.php to do that. At line 261, I changed the if block to :
if ($pattern || ($type != 'php' && $type != 'perl')) {
while (list(,$entry) = each($data)) {
if ($match_function($pattern,
$fullpath ? $entry : basename($entry))) {
if ($entry == $pattern) {
array_unshift($matches, $entry);
}
else {
$matches[] = $entry;
}
}
}
}
Of course, this only works if $pattern correspond exactly to what the user has typed, which I am absolutely not sure. Anyway, don't you think it's a good idea ?
More information about the aur-general
mailing list