Searching for prefix terms should be supported in Media Search. The exact level of implementation of this can vary based on what's possible.
At the very least, we must not allow a multi-term (e.g. via AND/OR/NOT) query to entirely fall back to a non-MediaSearch query builder.
Even if we fail to fully handle (e.g. fetch relevant statements for) the prefix term part, the other part should still work as intended, while the prefix term is allowed to only do a full text search. We should also make sure that, in such case, the prefix term extends to the captions as well.
Ideally, if/once implementation allows for it, we also find statements for the prefix term query, both when it's a standalone prefix term query, or when used in combination with other terms (via AND/OR/NOT)
Acceptance criteria
REQUIRED:
- https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=cat%20AND%20do*&cirrusDumpQueryAST mention "mediasearch" under "queryClassCache", indicating that Media Search supports this kind of query
IDEAL:
- https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=ca*&cirrusDumpQueryAST mention "mediasearch" under "queryClassCache", indicating that Media Search supports this kind of query
- https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=ca*+OR+do*&cirrusDumpQueryAST mention "mediasearch" under "queryClassCache", indicating that Media Search supports this kind of query
- search results also make sense (but given the many factors involved, absence of good results might not necessarily mean this specific feature doesn't work)