Substring search for project: in Search Oracle

Instead of prefix searching, use substring search for the project name
auto-completion in the Search Oracle.

This will yield the same results as the project listing screen, which
our end users would prefer.

Keep the prefix parameter for the projects/ REST Api for compatibility
with existing external scripts and UIs.

Change-Id: I281d944d8e4f637ad5d1b5bc2ccf0ff4badd8f05
This commit is contained in:
Gustaf Lundh
2017-04-24 22:19:20 +02:00
parent 831c40cce9
commit b0cb61eb6c

View File

@@ -44,9 +44,9 @@ public class ProjectMap extends NativeMap<ProjectInfo> {
.get(NativeMap.copyKeysIntoChildren(callback));
}
public static void suggest(String prefix, int limit, AsyncCallback<ProjectMap> cb) {
public static void suggest(String match, int limit, AsyncCallback<ProjectMap> cb) {
new RestApi("/projects/")
.addParameter("p", prefix)
.addParameter("m", match)
.addParameter("n", limit)
.addParameterRaw("type", "ALL")
.addParameterTrue("d") // description