NIMMessageSearchExParams class
检索消息参数
- Annotations
-
- @JsonSerializable.new(explicitToJson: true)
Constructors
-
NIMMessageSearchExParams({String? pageToken, String? conversationId, List<
String> ? keywordList, NIMSearchKeywordMatchType? keywordMatchType, List<String> ? senderAccountIds, List<NIMMessageType> ? messageTypes, List<int> ? messageSubtypes, int? searchStartTime, int? searchTimePeriod, int? limit, NIMSearchDirection? direction, NIMSearchStrategy? strategy, List<NIMMessageIndex> ? indices, bool? onlyIndex}) -
NIMMessageSearchExParams.fromJson(Map<
String, dynamic> json) -
factory
Properties
- conversationId ↔ String?
-
搜索 “全部会话” 还是搜索 “指定的会话”
conversationId 为空(null),搜索全部会话;
conversationId 不为空,搜索指定会话。
getter/setter pair
- direction ↔ NIMSearchDirection?
-
检索方向
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
indices
↔ List<
NIMMessageIndex> ? -
消息索引列表,用于指定检索的消息范围
与 conversationId 互斥,当 indices 不为空时,conversationId 无效
getter/setter pair
-
keywordList
↔ List<
String> ? -
关键字列表,
最多支持 5 个。当消息发送者以及消息类型均未指定时,必须设置关键字列表;否则,关键字列表可以为空。
getter/setter pair
- keywordMatchType ↔ NIMSearchKeywordMatchType?
-
指定关键字列表匹配类型
可设置为 “或” 关系搜索,或 “与” 关系搜索。取值分别为 V2TIM_KEYWORD_MATCH_TYPE_OR 和 V2TIM_KEYWORD_MATCH_TYPE_AND。默认为 “或” 关系搜索。
关键字列表为空或为数量为1,该字段无效
getter/setter pair
- limit ↔ int?
-
搜索的数量限制,
最大 100
getter/setter pair
-
messageSubtypes
↔ List<
int> ? -
指定消息子类型,
为 null 或空列表,则表示查询所有消息子类型
关键字不为空时,不支持检索通知类消息
非文本消息,只检索对应检索字段,如果检索字段为空则该消息不回被检索到
getter/setter pair
-
messageTypes
↔ List<
NIMMessageType> ? -
指定消息类型,
为 null 或空列表,则表示查询所有消息类型
关键字不为空时,不支持检索通知类消息
非文本消息,只检索对应检索字段,如果检索字段为空则该消息不回被检索到
getter/setter pair
- onlyIndex ↔ bool?
-
是否只返回索引,不返回消息体
true:只返回消息索引;false(默认):返回完整消息
getter/setter pair
- pageToken ↔ String?
-
搜索的起始位置,第一次填写空字符串,续拉时填写上一次返回的 V2NIMMessageSearchResult 中的 nextPageToken。
两次查询参数必须一致
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchStartTime ↔ int?
-
搜索的起始时间点,
默认为 0(从现在开始搜索)。UTC 时间戳,单位:毫秒。
getter/setter pair
- searchTimePeriod ↔ int?
-
从起始时间点开始的过去时间范围,
默认为 0(不限制时间范围)。24 x 60 x 60 x 1000 代表过去一天,单位:毫秒。
getter/setter pair
-
senderAccountIds
↔ List<
String> ? -
指定消息发送者,
最多支持 5 个。
超过返回参数错误, accountId 默认只检查数量,不检查是否重复
null 和 size==0 都表示没有指定人数
getter/setter pair
- strategy ↔ NIMSearchStrategy?
-
消息检索的策略
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited