Public 成员函数 | |
| EMMessageSearchOption () | |
| void | setKeywordList (List< String > keywordList) |
| void | setKeywordMatchType (EMKeywordListMatchType keywordMatchType) |
| void | setConversationId (String conversationId) |
| void | setMsgTypes (List< EMMessage.Type > msgTypes) |
| void | setStartTime (long startTime) |
| void | setEndTime (long endTime) |
| void | setSearchScope (EMConversation.EMMessageSearchScope searchScope) |
服务端消息搜索的参数配置类。 该功能需要在 Console 开通「消息搜索」增值服务。
| com.hyphenate.chat.EMMessageSearchOption.EMMessageSearchOption | ( | ) |
构造函数。
| void com.hyphenate.chat.EMMessageSearchOption.setConversationId | ( | String | conversationId | ) |
设置会话 ID 过滤(可选)。对于单聊,为对方用户 ID;对于群聊/聊天室,为群组/聊天室 ID。为空表示搜索所有会话。
| void com.hyphenate.chat.EMMessageSearchOption.setEndTime | ( | long | endTime | ) |
设置消息查询的结束时间,Unix 时间戳,单位为毫秒,需与起始时间同时指定。
| void com.hyphenate.chat.EMMessageSearchOption.setKeywordList | ( | List< String > | keywordList | ) |
设置搜索关键词列表(每个关键词 1-512 字符,总共最大 1024 字符,最多 5 个关键词)。
| void com.hyphenate.chat.EMMessageSearchOption.setKeywordMatchType | ( | EMKeywordListMatchType | keywordMatchType | ) |
设置搜索关键词查询组合方式,默认值为 EMKeywordListMatchType#OR。
| void com.hyphenate.chat.EMMessageSearchOption.setMsgTypes | ( | List< EMMessage.Type > | msgTypes | ) |
设置消息类型过滤(可选),不支持透传消息和语音消息搜索。
| void com.hyphenate.chat.EMMessageSearchOption.setSearchScope | ( | EMConversation.EMMessageSearchScope | searchScope | ) |
设置搜索范围,默认仅搜索消息内容。详见 EMConversation.EMMessageSearchScope。
| void com.hyphenate.chat.EMMessageSearchOption.setStartTime | ( | long | startTime | ) |
设置消息查询的起始时间,Unix 时间戳,单位为毫秒,需与结束时间同时指定。