Skip to content
Chatto v0.5.0

MessageSearchService

Chatto exposes this service below /api/connect.

Shared message and enum definitions are documented in Shared Types And Enums.

Searches current message content visible to an authenticated user.

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/GetStatus

Request for current message-search availability.

Current message-search availability.

FieldTypeDescription
stateMessageSearchStateCurrent feature/provider state.
retry_aftergoogle.protobuf.DurationSuggested delay before checking again while search is not ready.

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/SearchMessages

Request to search current message bodies visible to the authenticated user.

FieldTypeDescription
querystringRequired 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_idoptional stringOptional room-ID scope. The server intersects this room with rooms the current user may read and with any in: filters in query.
author_idoptional stringOptional author-ID scope. The server intersects this author with any from: filters in query.
created_aftergoogle.protobuf.TimestampExclusive lower bound on message creation time. The stricter bound wins when query also contains after:.
created_beforegoogle.protobuf.TimestampExclusive upper bound on message creation time. The stricter bound wins when query also contains before:.
has_attachmentsboolWhen true, return only messages that currently have attachments.
orderMessageSearchOrderDefaults to relevance in both result modes. Thread activity order requires thread grouping; newest order uses matching-message creation time.
page_sizeuint32Maximum 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.
cursorstringOpaque cursor returned by the preceding response. It is bound to the authenticated user and every other query field.
scopeMessageSearchScopeCandidate scope. Followed threads are selected before result pagination.
group_byMessageSearchGroupByResult grouping. The server deduplicates threads before pagination.
root_author_filterThreadRootAuthorFilterSelect 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.

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.

FieldTypeDescription
resultsrepeated MessageSearchResultOrdered matches. With THREAD grouping, one result per matching thread. Otherwise each result is one message, without thread_context.
next_cursorstringOpaque cursor for the next page in the selected result mode. Empty means no more matches. Live activity can reorder thread pages.
thread_total_countoptional uint64Total distinct matching threads. Present only when group_by is THREAD.
includesRoomTimelineIncludesRelated entities for grouped results, avoiding per-row reads.