MessageSearchService
Chatto exposes this service below /api/connect.
Shared message and enum definitions are documented in Shared Types And Enums.
MessageSearchService
Section titled “MessageSearchService”Searches current message content visible to an authenticated user.
GetStatus
Section titled “GetStatus”Reports whether the operator enabled Search and whether its provider can currently answer. This method remains available when Search is disabled.
POST /api/connect/chatto.api.v1.MessageSearchService/GetStatusInput: GetStatusRequest
Section titled “Input: GetStatusRequest”Request for current message-search availability.
Result: GetStatusResponse
Section titled “Result: GetStatusResponse”Current message-search availability.
| Field | Type | Description |
|---|---|---|
state | MessageSearchState | Current feature/provider state. |
retry_after | google.protobuf.Duration | Suggested delay before checking again while search is not ready. |
SearchMessages
Section titled “SearchMessages”Searches current message bodies in rooms where the caller is a member. Scope and grouping are independent, including for direct messages. THREAD grouping returns one row per matching root and its replies. Scope, grouping, and ordering are part of the cursor scope. Unsupported combinations return INVALID_ARGUMENT. Existing requests return individual messages by default. Results also require message.read or a matching thread relationship with message.read-interactions. Results are authorized and hydrated from current Chatto state after provider matching. Returns FAILED_PRECONDITION when Search is disabled and UNAVAILABLE when its provider is not ready.
POST /api/connect/chatto.api.v1.MessageSearchService/SearchMessagesInput: SearchMessagesRequest
Section titled “Input: SearchMessagesRequest”Request to search current message bodies visible to the authenticated user.
| Field | Type | Description |
|---|---|---|
query | string | Required query expression. Words are required terms, quoted text is an exact phrase, and AND may separate terms. The query also accepts in:, from:, before:, after:, and has:attachment filters; a recognized filter may be used without a word or phrase. |
room_id | optional string | Optional room-ID scope. The server intersects this room with rooms the current user may read and with any in: filters in query. |
author_id | optional string | Optional author-ID scope. The server intersects this author with any from: filters in query. |
created_after | google.protobuf.Timestamp | Exclusive lower bound on message creation time. The stricter bound wins when query also contains after:. |
created_before | google.protobuf.Timestamp | Exclusive upper bound on message creation time. The stricter bound wins when query also contains before:. |
has_attachments | bool | When true, return only messages that currently have attachments. |
order | MessageSearchOrder | Defaults to relevance in both result modes. Thread activity order requires thread grouping; newest order uses matching-message creation time. |
page_size | uint32 | Maximum results to return (messages or distinct threads). Zero uses 50; the maximum is 100. Stale or no-longer-visible provider hits are omitted, so a page may contain fewer messages than requested even when next_cursor is present. |
cursor | string | Opaque cursor returned by the preceding response. It is bound to the authenticated user and every other query field. |
scope | MessageSearchScope | Candidate scope. Followed threads are selected before result pagination. |
group_by | MessageSearchGroupBy | Result grouping. The server deduplicates threads before pagination. |
root_author_filter | ThreadRootAuthorFilter | Select root authors within FOLLOWED_THREADS before search and pagination. Other scopes require UNSPECIFIED. This does not restrict reply authors; author_id and from: still select the authors of matching messages. |
Result: SearchMessagesResponse
Section titled “Result: SearchMessagesResponse”One ordered page of current, authorized message or thread results. Pagination reads a live search index rather than a pinned snapshot, so results may move, repeat, or disappear between page requests while the index advances.
| Field | Type | Description |
|---|---|---|
results | repeated MessageSearchResult | Ordered matches. With THREAD grouping, one result per matching thread. Otherwise each result is one message, without thread_context. |
next_cursor | string | Opaque cursor for the next page in the selected result mode. Empty means no more matches. Live activity can reorder thread pages. |
thread_total_count | optional uint64 | Total distinct matching threads. Present only when group_by is THREAD. |
includes | RoomTimelineIncludes | Related entities for grouped results, avoiding per-row reads. |