Public Member Functions | |
V2TIMMessageSearchParam () | |
V2TIMMessageSearchParam (const V2TIMMessageSearchParam &) | |
V2TIMMessageSearchParam & | operator= (const V2TIMMessageSearchParam &) |
~V2TIMMessageSearchParam () | |
Data Fields | |
V2TIMStringVector | keywordList |
V2TIMKeywordListMatchType | keywordListMatchType |
V2TIMStringVector | senderUserIDList |
V2TIMElemTypeVector | messageTypeList |
V2TIMString | conversationID |
uint32_t | searchTimePosition |
uint32_t | searchTimePeriod |
uint32_t | pageIndex |
uint32_t | pageSize |
uint32_t | searchCount |
V2TIMString | searchCursor |
V2TIMMessageSearchParam | ( | const V2TIMMessageSearchParam & | ) |
V2TIMMessageSearchParam& operator= | ( | const V2TIMMessageSearchParam & | ) |
V2TIMStringVector keywordList |
Specify the keywords (max 5). If neither the sender nor message type is specified, the keyword list cannot be empty.
V2TIMKeywordListMatchType keywordListMatchType |
Whether to combine the keywords with OR (V2TIM_KEYWORD_LIST_MATCH_TYPE_OR) or AND (V2TIM_KEYWORD_LIST_MATCH_TYPE_AND). The default is OR.
V2TIMStringVector senderUserIDList |
Specify the senders (max 5 user IDs)
V2TIMElemTypeVector messageTypeList |
Set the message types to search. If null is passed in, all message types supported are searched (V2TIMFaceElem and V2TIMGroupTipsElem are not supported).
V2TIMString conversationID |
Search all conversations or a specified conversation
If conversationID is null, the messages in all conversations will be searched.
If conversationID is not null, the messages of a specific conversation will be searched. You need to pass in the unique ID of a conversation. For one-to-one chats, the value format is "c2c_userID". For group chats, the value format is "group_groupID".
uint32_t searchTimePosition |
Specify the start time for search. The default value is 0, indicating the current time. You can also set it to a UTC timestamp, in seconds.
uint32_t searchTimePeriod |
Set the time range (seconds) for search. The default value 0 indicates the time range is not limited. If you set it to 24x60x60, messages in the past day will be searched.
uint32_t pageIndex |
Specify the page number (which starts from 0). This is used to paginate search results. For example, to return 10 results per page, you can do the following:
uint32_t pageSize |
Set the maximum number of results returned per page. This is used to paginate search results. If you set the parameter to 0, the results will not be paginated. Please note that the search performance may be compromised if you do not paginate search results when there are too many of them.
uint32_t searchCount |
Set the number of results returned per cloud search
V2TIMString searchCursor |
Set the starting position for a cloud search. For the first call, leave the parameter empty. For subsequent calls, pass in the value of searchCursor in V2TIMMessageSearchResult.