You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: yield pages from the message search streams
Have the search streams yield whole pages instead of individual results so
consumers can decide to stop between (potentially expensive) polls, and to
mirror how server-side search pagination works.
[**breaking**]`Room::search_messages` and `Client::search_messages` no longer take a `num_results_per_batch` parameter. The returned `RoomSearchIterator`/`GlobalSearchIterator`'s `next_events()` now yields one page of results per call.
[**breaking**] The message search helpers now expose their results as `Stream`s instead of bespoke iterators. `Room::search_messages` returns a stream of `(score, event_id)` pairs (use the new `Room::search_messages_events` for full `TimelineEvent`s), and `GlobalSearchBuilder::build`/`build_events` replace the removed `RoomSearchIterator`/`GlobalSearchIterator` types. The `num_results_per_batch` parameter is gone, as batching is now up to the caller.
1
+
[**breaking**] The message search helpers now expose their results as `Stream`s of pages instead of bespoke iterators. `Room::search_messages` returns a stream of pages of `(score, event_id)` pairs (use the new `Room::search_messages_events` for full `TimelineEvent`s), and `GlobalSearchBuilder::build`/`build_events` replace the removed `RoomSearchIterator`/`GlobalSearchIterator` types.
0 commit comments