search Messages
Searches for messages in a specified conversation based on a keyword.
Note: To enable custom messages to be searchable, implement the getSearchableWord method in your custom message class.
Since
5.0.0
Parameters
Specifies the conversation type.
Specifies the conversation ID.
The keyword to search for.
The number of search results to return. Pass 0 to return all matched messages; otherwise, results are returned paginated.
Specifies the timestamp to start searching from. Pass 0 to search from the latest message and move backward.
Callback for handling 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.
Since
5.1.2
Parameters
Specifies the conversation type.
Specifies the conversation ID.
The keyword to search for.
The start time of the search range.
The end time of the search range.
The offset for pagination.
The maximum 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 the 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 within a specific conversation based on criteria such as keywords, object name lists, and time range. The search results are returned via a callback.
Since
5.8.1
Parameters
The conversation type and conversation ID.
The keyword to search for (non-empty).
An array of message types, supporting multiple types (e.g., text: RC:TxtMsg).
The maximum number of messages to query [maximum 100; if exceeded, 100 is used].
The timestamp to search for messages before this time (pass 0 to start searching from the latest message), in milliseconds.
The callback interface for search results. Returns a message list on success, or an error message on failure.