On Sat, 5 Apr 2008 12:33:15 +0200 Piotr HusiatyĆski <phusiatynski@gmail.com> wrote:
3 is ok, becouse of lua, abs, git and many other names. But right now, I can do `aur search a` and the result is 8130 names. Or searching with short words should be allowed, but the result has to be cut to smaller amount of data. You can search giving the single char, but you'll get only 50 first names.
{ "type" : "search" , "results":ReturnData, "cut" : ("yes"|"no"), }
This is a good idea, but instead of cut being boolean I would make it an integer. Zero (or less) would mean no cut and anything larger would mean cut at that number. I was also thinking search should return more information than just pkgname and pkgid. For example you could specify how much information you want returned from the search. Something like: ?type=search&arg=foo&fields=url,desc,tarball The fields would specify what information you want in addition to pkgname and pkgid. That would also help reduce hits on the server because right now if a client wants information on all the search results it would have to do a separate request for each package.