Search - Thunderbird
From MozillaZine Knowledge Base
Thunderbird has several built-in ways to search for text in messages:
You can enable searching any downloaded messages in the profile using whatever search engine is built-in to your operating system by checking Tools â€“> Options -> Advanced -> General -> Allow Windows Search to search messages. If you have a desktop search engine installed such as Recoll (Linux) , Everything (Windows) or Alfred (OS X) it can also search downloaded messages in your profile. Thunderbird defaults to using the mbox format to store messages. That is widely supported. You can also configure an account to use the maildir format. That stores messages in individual files using the .eml format, though they have no file extension. Many desktop search engines will have problems with Thunderbird's version of maildir.
There are several add-ons that enhance the built-in search methods such as:
Global search is enabled by default. It is the most widely used way to search messages. It quickly searches every folder (including archive folders) in every account. It can do that because it fetches messages as needed beforehand, and uses that data to build a search index (the Gloda database), using a background process. That makes the search very fast because of all of the preparation is done beforehand.
If you add a new account (with existing mail) it may take a while until all of the account's messages are added to the search index. In the interim, it silently ignores those messages. The search index can also get corrupt. When this occurs it doesn't return all of the matches, or returns data about non-existent messages. The workaround is to use Help -> Troubleshooting Information -> Open Folder to open your systems equivalent of Windows Explorer at the profile, exit Thunderbird, delete global-messages-db.*, restart Thunderbird, and wait a while for it to rebuild the search index.
See Global Search for how to use Global Search. Global search uses a faceted search. That means the search results are not exact matches, it will also attempt to find closely related matches. Most of the time this is a very useful feature, but there is no way to disable it if you want an exact match. Using double quotes doesn't help. It is the only search method that uses faceted search. Faceted search is not the same thing as using wildcards (which Global Search supports) or regular expressions (which it doesn't). If you search for "informative" it may include messages containing "information" for example.
Quick Filter bar
The Quick Filter bar searches the current folder. Initially it displays Unread, Starred, Contacts, Tags, and Attachment icons for filters that you can enable or disable with the mouse. It doesn't display "Filter messages by: Sender Recipients Subject Body" until you've typed some text in the search field that displays "Filter these messages Ctrl+Shift+K". You can enable/disable those additional filters the same way. They're displayed underneath the search field.
See Quick Filter bar for how to use the Quick Filter bar.
Classic Search is the original search built into Thunderbird. It can search the current folder, and any of its child folders. It's more powerful than the Quick Filter bar but not as convenient since you have to use several list boxes and other widgets in a popup window to specify what you want to search for. There aren't any add-ons to enhance it.
You can customize the main toolbar to add the Mail View widget by right clicking on the main toolbar, select "Customize" from the list box, drag and drop the Mail View widget to the toolbar and press "Done". It lets you select various views. A view is displayed in the folder listing window. Some predefined views are All, Unread, Not Deleted and Recent. You can create a custom view based on the search results from Classic Search. You can also save a custom view as a saved search folder.
The FiltaQuilla add-on adds new mail filter actions. However, it also lets you define custom search terms that supposedly can also be used in classic search. See the add-ons support page for more information.
Open Search lets you search for text that you selected in a message using a web based search engine such as Bing, and display the results in a tab in your systems default browser. To do this select the text using a mouse, right click on it, select "Search Bing for ....". Thunderbird provides support for using several different search engines including Google and DuckDuckGo. This is managed in Tools -> Options -> General -> Default Search Engine. You can also add support for other search engines using a local XML file.
Google Search is an add-on that adds support for Google Search in Open Search. Same with the instructions for adding DuckDuckGo. The ability to use them broke in version 60.0. It was fixed in version 60.5.0. Since support for Google and DuckDuckGo search is now built-in those add-ons are now longer needed.
For version 52 you can delete or rename the search.json.mozlz4 file in the profile (while Thunderbird is closed) and then restart TB to make it add the searchplugins xml files in the searchplugins directory in the profile to the available search options. It will create a new search.json.mozlz4 file. 
Saved Search is not another way to search messages. It is essentially a way to create a virtual folder, whose contents meet a certain search criteria. It supports the same search criteria as Classic Search, but lets you specify messages in any/all folders in any/all accounts. That virtual folder appears as if its a folder in the currently selected account. It doesn't effect where the messages are actually stored. This technology is also used in Unified Folders. Don't be mislead by the name, when you open the folder it updates the contents.
It can be used to work around the limitations of the Quick Filter bar or Classic Search since as far as they are concerned its just another folder. If it searches messages stored on your hard disk it will not be as fast as Global Search since there is no pre-built search index. So you need to be careful not to essentially do a (much slower) global search. However, if the folder is in a IMAP account Thunderbird normally sends a IMAP command to the server asking it to search that folder for it rather than fetching all of the messages and searching it itself. That is usually pretty quick.