Searching for phrase prefixes 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 phrase prefix part, the other part should still work as intended, while the phrase prefix is allowed to only do a full text search. We should also make sure that, in such case, the phrase prefix extends to the captions as well.
Ideally, if/once implementation allows for it, we also find statements for the phrase prefix query, both when it's a standalone phrase prefix 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%20%22black%20do*%22&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=%22san%20fra*%22&cirrusDumpQueryAST mention "mediasearch" under "queryClassCache", indicating that Media Search supports this kind of query
- https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap&q=%22san%20fra*%22+OR+%22new%20yo*%22&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)