Search messages & conversations

You can search messages & conversations if you're on the Growth plan or higher.

If you use the Inbox pre-built chat UI, you can search messages and conversations using the search box in the conversation list of the user's inbox.

search box

To enable the search functionality, go to the Settings page of your dashboard. In the Search section, check the Enable search checkbox.

search enabled checkbox

All the messages sent after enabling the search are searchable.

If you want to index older messages as well, you have to click on the Index all messages button.

Message indexing is a long process that can take several minutes, or even hours, depending on how many messages and conversations you have.

search indexing in progress

Note that while the search indexing is in progress you can safely close the Dashboard.

To disable the search functionality uncheck the Enable search checkbox, but beware that doing so wipes the search index, and should you want to enable search again you have to re-index all the messages.

Search results

When you search, TalkJS returns results for both individual messages and entire conversations.

Messages are included when:

  • Their text contains the search term
  • Their sender's name contains the search term
  • Their custom data has a search property which contains the search term

Conversations are included when:

  • Their subject contains the search term
  • Their custom.search property contains the search term

Setting the custom.search property lets you specify custom search terms for the conversation or message. A conversation with custom: { search: "t-shirt" } will appear when you search "shirt", even if that word never appears in the conversation or its messages.