@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

switch from term query to match query

Summary:
Switch to the `match` query. The operator is set to `and` because it defaults to `or` which is likely to annoy users. We might want to consider using `query_string` to get booleans, wildcards, and other features. The only problem with `query_string` is that it can allow querying on other fields in the json document, and we may want to prevent that. That might even expose information we don't want to expose. Another option would be to parse booleans ourselves and translate them to the ES query DSL.

fixes T5488

Test Plan: Try the `vpn`/`VPN` test case described in T5488.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: WikiChad, epriestley, Korvin

Maniphest Tasks: T5488

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

authored by

Lex and committed by
epriestley
a230e0fa 4dd9be5c

+5 -2
+5 -2
src/applications/search/engine/PhabricatorSearchEngineElastic.php
··· 97 97 98 98 if (strlen($query->getParameter('query'))) { 99 99 $spec[] = array( 100 - 'term' => array( 101 - 'field.corpus' => $query->getParameter('query'), 100 + 'match' => array( 101 + 'field.corpus' => array( 102 + 'operator' => 'and', 103 + 'query' => $query->getParameter('query'), 104 + ), 102 105 ), 103 106 ); 104 107 }