A class representing query to retrieve list of BaseMessages that matches a given query with given filters. MessageSearchQuery can be generated by using sendbirdChat.createMessageSearchQuery().

Hierarchy

  • default
    • MessageSearchQuery

Properties

advancedQuery: boolean = false

Whether the current search query should be an advanced query or not.

channelCustomType: string = ''

The current custom type of channel set as the search scope.

channelUrl: string = ''

The current channel url set as the search scope.

exactMatch: boolean = false

Whether the current search query should be an exact match or not.

keyword: string = ''

The current search keyword.

limit: number = DEFAULT_LIST_QUERY_LIMIT

The maximum number of data per queried page.

messageTimestampFrom: null | number = null

The start message timestamp set as the search range.

messageTimestampTo: null | number = null

The end message timestamp set as the search range.

order: MessageSearchOrder = MessageSearchOrder.SCORE

The current order method.

reverse: boolean = false

Whether the current search result is set to be reversed or not.

targetFields: null | string[] = null

The target fields of the current query as the search scope.

totalCount: number = -1

The total count of results that matches the given search.

Accessors

  • get hasNext(): boolean
  • Returns boolean

    Whether there is a next page.

  • get isLoading(): boolean
  • Returns boolean

    Whether the current query is in communication progress with server.

Methods

  • Returns Promise<BaseMessage[]>

    Gets the list of BaseMessages that matches the given search. If this method is repeatedly called after each next() is finished, it retrieves the following search results as BaseMessage list. If there is no more search results, an empty List (not null) is returned.