Problem: searching for 'vpn' on our phabricator instance returns results, including some that contain the term capitalized as 'VPN' and some that don't. Searching for 'VPN' or even 'vpN' returns zero results.
Reason: rPdd3dfde98360d68 switched to using a term query. term queries search for specific terms verbatim in the lucene index, and the query term is not analyzed. With the default analyzer/tokenizer, the corpus is broken down into terms at index-time and these terms are lowercased before being entered into the lucene index. A standard search would also analyze the search text, resulting in searching for lucene index terms as they were entered at index-time.
In other words, a match query would properly convert a search for "VPN" into the token "vpn", look for it in the lucene index, and find all of the matching documents, even those that contained "VPN". I'm not quite sure I understand how Phabricator constructs ES queries, but I believe the solution here is to switch to a match query:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html