Skip to content

Commit a98427c

Browse files
committed
Search supports pagination
1 parent df83435 commit a98427c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

content/reference/resources/channel/search.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ title: "Channel Search"
1111

1212
Returns [Channel](/reference/resources/channel/) objects which match a given search query. Because channels have no inherent notion of description or name, we take textual data from common channel annotations which contain such fields, e.g. <code>net.patter-app.settings</code>. We also allow filtering on specific channel properties, such as channel type. No matter what query data is supplied, the search results will respect channel ACLs, and results are limited to non-private channels if the requesting access token does not have the <code>messages</code> scope.
1313

14-
<%= general_params_note_for "channel" %> Note: Pagination works for all orderings on this endpoint. Be sure to make requests with before_id=min_id or since_id=max_id as usual when paginating the popularity-sorted results. Separate lists of terms by spaces.
14+
Separate lists of terms by spaces.
15+
16+
<%= general_params_note_for "channel" %>
1517

1618
<%= endpoint "GET", "channels/search", "User", "public_messages</code> or <code>messages" %>
1719

content/reference/resources/message/search.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ title: "Message Search"
1111

1212
Returns [Message](/reference/resources/message/) objects which match a given search query. This endpoint responds to a list of channel IDs which can either given specifically or performed on all PM or Broadcast channels that the user is subscribed to. Searches can either be ordered by `id` or `score`. Searches ordered by `id` require at least one query or filter to be specified; searches ordered by `score` require at least one query and zero or more filters to be specified. All parameters should be passed in the query string.
1313

14-
<%= general_params_note_for "message" %> Note: Pagination is currently only available for the `id` ordering. All queries and filters are combined with an AND operation. Query parameters (not filter parameters) can use <em>"quoted strings"</em> for phrases, search syntax like <em>+foo -bar</em> and <em>foo OR baz</em> for boolean queries. Separate lists of terms by spaces.
14+
All queries and filters are combined with an AND operation. Query parameters (not filter parameters) can use <em>"quoted strings"</em> for phrases, search syntax like <em>+foo -bar</em> and <em>foo OR baz</em> for boolean queries. Separate lists of terms by spaces.
15+
16+
<%= general_params_note_for "message" %>
1517

1618
<%= endpoint "GET", "channels/messages/search", "Any" %>
1719

1820
<%= query_params_typed 'General Parameters', [
1921

2022
["index", :optional, "string", "Type of index to use. The default (and currently, the only) index is <code>complete</code>, which searches all messages. <em>We may add additional index types later (e.g., an index only of recent messages, for speed.)</em>"],
2123

22-
["order", :optional, "string", "One of: <code>id</code> (default), <code>score</code>. Searches of ordering <code>id</code> are returned in roughly the same order as other streams, and support pagination. Searches of ordering <code>score</code> are returned by a relevance score. Currently, the only ordering that supports pagination is <code>id</code>, and we are working on improving relevance scores."],
24+
["order", :optional, "string", "One of: <code>id</code> (default), <code>score</code>. Searches of ordering <code>id</code> are returned in roughly the same order as other streams. Searches of ordering <code>score</code> are returned by a relevance score."],
2325

2426
]%>
2527

content/reference/resources/post/search.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ title: "Post Search"
1111

1212
Returns [Post](/reference/resources/post/) objects which match a given search query. Searches ordered by `id` require at least one query or filter to be specified; searches ordered by `score` require at least one query and zero or more filters to be specified. Searches require an ordering and at least one search query to be specified, and allow for zero or more filters to be added. All parameters should be passed in the query string.
1313

14-
<%= general_params_note_for "post" %> Note: Pagination is currently only available for the `id` ordering. All queries and filters are combined with an AND operation. Query parameters (not filter parameters) can use <em>"quoted strings"</em> for phrases, search syntax like <em>+foo -bar</em> and <em>foo OR baz</em> for boolean queries. Machine-only posts are not included in the search index. Separate lists of terms by spaces.
14+
All queries and filters are combined with an AND operation. Query parameters (not filter parameters) can use <em>"quoted strings"</em> for phrases, search syntax like <em>+foo -bar</em> and <em>foo OR baz</em> for boolean queries. Machine-only posts are not included in the search index. Separate lists of terms by spaces.
15+
16+
<%= general_params_note_for "post" %>
1517

1618
<%= endpoint "GET", "posts/search", "Any" %>
1719

1820
<%= query_params_typed 'General Parameters', [
1921

2022
["index", :optional, "string", "Type of index to use. The default (and currently, the only) index is <code>complete</code>, which searches all posts. <em>We may add additional index types later (e.g., an index only of recent posts, for speed.)</em>"],
2123

22-
["order", :optional, "string", "One of: <code>id</code> (default), <code>score</code>. Searches of ordering <code>id</code> are returned in roughly the same order as other streams, and support pagination. Searches of ordering <code>score</code> are returned by a relevance score. Currently, the only ordering that supports pagination is <code>id</code>, and we are working on improving relevance scores."],
24+
["order", :optional, "string", "One of: <code>id</code> (default), <code>score</code>. Searches of ordering <code>id</code> are returned in roughly the same order as other streams. Searches of ordering <code>score</code> are returned by a relevance score."],
2325

2426
]%>
2527

0 commit comments

Comments
 (0)