File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/org/opensolaris/opengrok/web/api/v1/controller
test/org/opensolaris/opengrok/web/api/v1/controller Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -252,10 +252,18 @@ public void addSearchCountsRaw(@Valid final List<TermIncrementData> termIncremen
252
252
}
253
253
}
254
254
255
+ /**
256
+ * Returns the searched terms sorted according to their popularity.
257
+ * @param project project for which to return the data
258
+ * @param field field for which to return the data
259
+ * @param page which page of data to retrieve
260
+ * @param pageSize number of results to return
261
+ * @return list of terms with their popularity
262
+ */
255
263
@ GET
256
264
@ Path ("/popularity/{project}" )
257
265
@ Produces (MediaType .APPLICATION_JSON )
258
- public List <Entry <String , Integer >> getPopularityData (
266
+ public List <Entry <String , Integer >> getPopularityDataPaged (
259
267
@ PathParam ("project" ) final String project ,
260
268
@ QueryParam ("field" ) @ DefaultValue (QueryBuilder .FULL ) final String field ,
261
269
@ QueryParam ("page" ) @ DefaultValue ("" + 0 ) final int page ,
Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ public void testWildcardQueryEndingWithAsterisk() {
612
612
.get (Result .class );
613
613
614
614
assertThat (res .suggestions .stream ().map (r -> r .phrase ).collect (Collectors .toList ()),
615
- contains ( "printf" ));
615
+ containsInAnyOrder ( "print" , "printf" ));
616
616
}
617
617
618
618
}
You can’t perform that action at this time.
0 commit comments