Using CirrusSearch directly for MediaSearch instead of an API call (T252685) should give us search syntax support automatically (such as keywords/filters (ie gold intitle:gym), quotes, and booleans).
However, using those search syntax features currently will revert the results back to those in Special:Search, instead of MediaSearch.
This ticket is to support search syntax features in MediaSearch without reverting to Special:Search results. Here we should restore existing functionality so that boolean operators work on text results only, but ignore statements/entities. A new ticket will be created if we decide to expand booleans to work on statements/entities.
Notes from Matthias:
Negation etc. is becoming a lot more complex now that the data goes out to multiple sources.
So `-dog` no longer means that `dog` may not exist in the text. There may also not be any `dog` entity attached and it may not appear in caption.
Same with boolean operations. `dog AND cat` may be satisfied by `cat` being in wikitext and `dog` as depicts statement.
//It's going to be a lot of work - if at all possible - to get it that complex.//