When adding this to the search dialog, this would require fetching data from QHS while performing the search. Therefore better integrating that to the relicensing plugin?
Yes, so basically we need a way to extend the search engine by plugins?
This is something that is being done in #7178, so once the design is finalized and committed someone can extend the licensechange plugin to provide these kind of search operators.