api-docs: Document optimization of is:unread filter.

Documents that the is:unread narrow/filter can be an important
optimization for clients to consider using in certain cases.

Fixes #28328.
This commit is contained in:
JohnLu2004 2024-03-25 12:21:11 -04:00 committed by Tim Abbott
parent 0a90a13bec
commit 11c9e5bb3d
2 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,12 @@ operator, search the current user's personal message history. See
[searching shared history](/help/search-for-messages#searching-shared-history)
for details.
Clients should note that the `is:unread` filter takes advantage of the
fact that there is a database index for unread messages, which can be an
important optimization when fetching messages in certain cases (e.g.
when [adding the `read` flag to a user's personal
messages](/api/update-message-flags-for-narrow)).
**Changes**: In Zulip 7.0 (feature level 177), support was added
for three filters related to direct messages: `is:dm`, `dm` and
`dm-including`. The `dm` operator replaced and deprecated the

View File

@ -7043,6 +7043,11 @@ paths:
The narrow you want update flags within. See how to
[construct a narrow](/api/construct-narrow).
Note that, when adding the `read` flag to messages, clients should
consider including a narrow with the `is:unread` filter as an
optimization. Including that filter takes advantage of the fact that
the server has a database index for unread messages.
**Changes**: In Zulip 7.0 (feature level 177), narrows gained support
for three new filters related to direct messages: `is:dm`, `dm` and
`dm-including`; replacing and deprecating `is:private`, `pm-with` and