searchMessages

fun searchMessages(channelFilter: FilterObject, messageFilter: FilterObject, offset: Int? = null, limit: Int? = null, next: String? = null, sort: QuerySorter<Message>? = null): Call<SearchMessagesResult>

Search messages across channels. There are two ways to paginate through search results:

  1. Using limit and offset parameters

  2. Using limit and next parameters

Limit and offset will allow you to access up to 1000 results matching your query. You will not be able to sort using limit and offset. The results will instead be sorted by relevance and message ID.

Next pagination will allow you to access all search results that match your query, and you will be able to sort using any filter-able fields and custom fields. Pages of sort results will be returned with next and previous strings which can be supplied as a next parameter when making a query to get a new page of results.

Return

Executable async Call responsible for searching messages across channels.

Parameters

channelFilter

Channel filter conditions.

messageFilter

Message filter conditions.

offset

Pagination offset, cannot be used with sort or next.

limit

The number of messages to return.

next

Pagination parameter, cannot be used with non-zero offset.

sort

The sort criteria applied to the result, cannot be used with non-zero offset.