The Add-In search, rather than searching the database itself, calls a function in an Add-In. The function must return the search results in the XML format described in the help file.
Since Add-Ins are written in a proper programming language (usually C#) and have access to the Object Model API, it is far easier to implement an arbitrarily complex search in an Add-In than in an SQL query.
The disadvantage is that writing an Add-In is a much bigger job than putting together a query.