Closed FroMage closed 10 years ago
Do you want to add new api or extend RepoApi.searchModules
with new parameter packageQuery
?
I think a new API endpoint
Done.
Excellent!
This looks good, but I think it's a bit different from the original issue, because you implemented search by member, not just by package.
Also you implemented an inexact search.
I think we need another API to search just by package (not looking at member part), with a boolean option to search for exact match or partial match.
no problem
Thanks!
@thradec I was just looking at this because it seems this was never actually "connected" on the client side. Now trying to figure out how to do that I'm seeing that the searchModulesByMember()
doesn't have an exactMatch
parameter like searchModulesByPackage()
does. Could you still add that one? Please? :)
Hmm, there's even more. I'm seeing that the original module query isn't part of the API either. In the local implementation the package or member names are additional filters. If you just want to search for package name only we just pass ""
to the module part of the query. Would it be possible to make it like that?
So the thing is that the ModuleQuery
object we use locally for our searches has the following fields:
protected String name;
protected Type type;
// protected Retrieval retrieval;
private Long start;
private Long count;
private long[] pagingInfo;
private Integer binaryMajor;
private Integer binaryMinor;
private String memberName;
private boolean memberSearchPackageOnly;
private boolean memberSearchExact;
And all or any of those can be set. So what we really need is an API that can do that for the Herd.
PS: I commented out the "retrieval" field because it's new and it's implementation for the Herd is a separate issue (see ceylon/ceylon-herd#181).
@quintesse in 3e192b0 I added new API, temporary on path /api/1/search-modules2
, let me know if it works as you requested. I removed former two /search-by-package
and /search-by-member
, which weren't used, but I'm not sure if I can remove also origin /search-modules
, or leave it for backward compatibility?
Thanks @thradec , I'll take a look at this as soon as I can.
Depends on #9 I guess, to store the package names.