@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.

By default, do not save queries when executing Conduit "*.search" calls

Summary:
Fixes T11304. Prior to this change, we did an unnecessary write on every "*.search" call (this write didn't always actually write a row, since we only save //unique// saved queries, but still doesn't do anything useful ever, currently).

Instead, change this to not-write by default. We could add an "oh, and also I want you to do a write" option later, which would let us implement something like `arc query-stuff` which says "To see more results, view this URI in your browser: ...".

(It's possible to run one of these methods with an existing SavedQuery by using the key, so we still sometimes have a queryKey to return.)

Test Plan: Ran `almanac.service.search`, used DarkConsole to verify that no serachengine writes occurred.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11304

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

+6 -1
+6 -1
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 1160 1160 $saved_query->setParameter($field->getKey(), $value); 1161 1161 } 1162 1162 1163 - $this->saveQuery($saved_query); 1163 + // NOTE: Currently, when running an ad-hoc query we never persist it into 1164 + // a saved query. We might want to add an option to do this in the future 1165 + // (for example, to enable a CLI-to-Web workflow where user can view more 1166 + // details about results by following a link), but have no use cases for 1167 + // it today. If we do identify a use case, we could save the query here. 1164 1168 1165 1169 $query = $this->buildQueryFromSavedQuery($saved_query); 1166 1170 $pager = $this->newPagerForSavedQuery($saved_query); ··· 1234 1238 'data' => $data, 1235 1239 'maps' => $method->getQueryMaps($query), 1236 1240 'query' => array( 1241 + // This may be `null` if we have not saved the query. 1237 1242 'queryKey' => $saved_query->getQueryKey(), 1238 1243 ), 1239 1244 'cursor' => array(