mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove search limit (#1887)
This commit is contained in:
@@ -111,16 +111,14 @@ public class CategoryREST {
|
||||
@Parameter(description = "limit for paging, default 20, maximum 1000") @DefaultValue("20") @QueryParam("limit") int limit,
|
||||
@Parameter(description = "ordering") @QueryParam("order") @DefaultValue("desc") ReadingOrder order,
|
||||
@Parameter(
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces, 3 characters minimum") @QueryParam("keywords") String keywords,
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces") @QueryParam("keywords") String keywords,
|
||||
@Parameter(
|
||||
description = "comma-separated list of excluded subscription ids") @QueryParam("excludedSubscriptionIds") String excludedSubscriptionIds,
|
||||
@Parameter(description = "keep only entries tagged with this tag") @QueryParam("tag") String tag) {
|
||||
|
||||
Preconditions.checkNotNull(readType);
|
||||
|
||||
keywords = StringUtils.trimToNull(keywords);
|
||||
Preconditions.checkArgument(keywords == null || StringUtils.length(keywords) >= 3);
|
||||
List<FeedEntryKeyword> entryKeywords = FeedEntryKeyword.fromQueryString(keywords);
|
||||
List<FeedEntryKeyword> entryKeywords = FeedEntryKeyword.fromQueryString(StringUtils.trimToNull(keywords));
|
||||
|
||||
limit = Math.min(limit, 1000);
|
||||
limit = Math.max(0, limit);
|
||||
@@ -203,7 +201,7 @@ public class CategoryREST {
|
||||
@Parameter(description = "limit for paging, default 20, maximum 1000") @DefaultValue("20") @QueryParam("limit") int limit,
|
||||
@Parameter(description = "date ordering") @QueryParam("order") @DefaultValue("desc") ReadingOrder order,
|
||||
@Parameter(
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces, 3 characters minimum") @QueryParam("keywords") String keywords,
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces") @QueryParam("keywords") String keywords,
|
||||
@Parameter(
|
||||
description = "comma-separated list of excluded subscription ids") @QueryParam("excludedSubscriptionIds") String excludedSubscriptionIds,
|
||||
@Parameter(description = "keep only entries tagged with this tag") @QueryParam("tag") String tag) {
|
||||
|
||||
@@ -145,14 +145,12 @@ public class FeedREST {
|
||||
@Parameter(description = "offset for paging") @DefaultValue("0") @QueryParam("offset") int offset,
|
||||
@Parameter(description = "limit for paging, default 20, maximum 1000") @DefaultValue("20") @QueryParam("limit") int limit,
|
||||
@Parameter(description = "ordering") @QueryParam("order") @DefaultValue("desc") ReadingOrder order, @Parameter(
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces, 3 characters minimum") @QueryParam("keywords") String keywords) {
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces") @QueryParam("keywords") String keywords) {
|
||||
|
||||
Preconditions.checkNotNull(id);
|
||||
Preconditions.checkNotNull(readType);
|
||||
|
||||
keywords = StringUtils.trimToNull(keywords);
|
||||
Preconditions.checkArgument(keywords == null || StringUtils.length(keywords) >= 3);
|
||||
List<FeedEntryKeyword> entryKeywords = FeedEntryKeyword.fromQueryString(keywords);
|
||||
List<FeedEntryKeyword> entryKeywords = FeedEntryKeyword.fromQueryString(StringUtils.trimToNull(keywords));
|
||||
|
||||
limit = Math.min(limit, 1000);
|
||||
limit = Math.max(0, limit);
|
||||
@@ -207,7 +205,7 @@ public class FeedREST {
|
||||
@Parameter(description = "offset for paging") @DefaultValue("0") @QueryParam("offset") int offset,
|
||||
@Parameter(description = "limit for paging, default 20, maximum 1000") @DefaultValue("20") @QueryParam("limit") int limit,
|
||||
@Parameter(description = "date ordering") @QueryParam("order") @DefaultValue("desc") ReadingOrder order, @Parameter(
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces, 3 characters minimum") @QueryParam("keywords") String keywords) {
|
||||
description = "search for keywords in either the title or the content of the entries, separated by spaces") @QueryParam("keywords") String keywords) {
|
||||
|
||||
Response response = getFeedEntries(id, readType, newerThan, offset, limit, order, keywords);
|
||||
if (response.getStatus() != Status.OK.getStatusCode()) {
|
||||
|
||||
Reference in New Issue
Block a user