We get requests from time to time to update Search internally in BMO to support specific search use cases for retrieving data from the DB. BMO search is coded (broken) in a way that makes it non-trivial to update to support the types of searches that users expect.
Something we discussed doing is create a drop in modular framework that uses direct SQL to get data for users and their specific data needs. Each module will create a specific API endpoint that takes parameters that can be plugged into the SQL as needed. When a new module is dropped in, it will automatically become available. We do something similar for bug field changes in the MozChangeField extension already.
This will map to
The matching bugs will be filtered before returning based on current user permissions and fields will match the normal bug search API and can also be filtered.