Thread:Project:Support desk/How to form a search query in MediaWiki with multiple terms in the srsearch parameter?/reply

(Answering an old question in case anyone comes looking for an answer.)

If you type the search "A B" or "B A" into the search field, you'll get the same results. So, use URI-encoding ("+" for " ") and you'll have what you want: https://www.mediawiki.org/w/api.php?action=query&list=search&srsearch=B+A&srbackend=LuceneSearch&format=jsonfm

Note that in doing this I got a strange error: