search Messages
Searches for messages in a specified conversation based on a keyword.
Note: To make custom messages searchable, implement the getSearchableWord method in your custom message class. For ultra group conversations, only messages stored locally can be searched.
Since
5.1.1
Parameters
The type of the specified conversation.
The ID of the specified conversation.
The business identifier of the conversation to which the message belongs.
The keyword to search for.
The number of search results to return. Pass 0 to return all matching messages; otherwise, results are returned page by page.
Search for messages before this timestamp. Pass 0 to start searching from the latest message and move backward in time.
Callback for search results.
Searches for messages in a specified conversation within a given time range based on keywords.
Note: To make custom messages searchable, implement the getSearchableWord method in your custom message class. For ultra group conversations, only locally stored messages can be searched.
Since
5.1.2
Parameters
The specified conversation type.
The specified conversation ID.
The business identifier of the conversation to which the message belongs.
The search keyword.
The start time of the search range.
The end time of the search range.
The offset for pagination.
The number of search results to return. Must be greater than 0, with a maximum value of 100. If greater than 100, it will default to 100.
Callback for search results.
Searches for local historical messages of specified message types in a specific conversation based on keywords
This method allows applications to search for messages in a specific conversation based on conditions such as keywords, object name lists, and time ranges. The search results will be returned via a callback.
Since
5.8.1
Parameters
Conversation type and conversation ID
Keyword, cannot be empty
Array of message types, supports multiple entries (e.g., text: RC:TxtMsg)
Maximum number of queries [maximum 100, if exceeded, 100 will be used]
Query messages before startTime (pass 0 to start searching from the latest message), unit: milliseconds
Callback interface for search results. Returns a message list on success, or an error message on failure.