Default CJK query terms to "substring" mode, not "term" mode

Authored by epriestley on Sep 22 2017, 2:01 PM.

Description

Default CJK query terms to "substring" mode, not "term" mode

Summary:
Ref T12995. This might be a little rough but should get us started on CJK support.

If a query term has CJK characters and doesn't have a query operator, default it to "substring" mode instead of "term" mode.

You can force a query term into "term" mode with the "+" operator, which is normally redundant. So this should just make the default behavior better without removing any capabilities.

Test Plan:

  • Added some unit tests and made them pass.
  • Searched for "主羽岡" with no operators, found "距暮類供派主羽岡際問月勉央".

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12995

Differential Revision: https://secure.phabricator.com/D18634