Message search allows you to retrieve a list of messages that contain a search query or a specified keyword in group channels by implementing MessageSearchQuery
. The query retrieves a list of messages that contain a search term and meet the optional parameter values set in MessageSearchQueryParams
. The createMessageSearchQuery
method uses various parameters to support complex search conditions.
You can create the query instance by following the code below.
Then, the query retrieves a list of match results. Calling the builder method again returns the next page of the results.
Use the hasNext
method to see if there is a next page.
Use the isLoading
method to see if the search results are loading.
Parameter name | Type | Description |
---|---|---|
keyword | string | Specifies the search term. |
channelUrl | string | Specifies the URL of the target channel. |
channelCustomType | string | Specifies the custom channel type. |
limit | number | Specifies the number of messages to return per page. Acceptable values are |
exactMatch | boolean | Determines whether to search for messages that exactly match the search term. If set to |
messageTimestampFrom | number | Restricts the search scope to messages sent after the specified value in Unix milliseconds |
messageTimestampTo | number | Restricts the search scope to messages sent before the specified value in Unix milliseconds |
order | string | Determines by which field the results are sorted. Acceptable values are the following: |
reverse | boolean | Determines whether to sort the results in reverse order. If set to |