Page MenuHomePhabricator

Searches containing capital letters return no results
Closed, ResolvedPublic

Description

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

Event Timeline

lexelby raised the priority of this task from to Needs Triage.
lexelby updated the task description. (Show Details)
lexelby added a project: Phabricator.
lexelby added a subscriber: lexelby.
chad renamed this task from searches containing capital letters return no results to Searches containing capital letters return no results.Jun 26 2014, 7:47 PM

I can't tell if your title change is a stylistic thing or if you're either making a joke or testing search ;)