Phabricator/Search

This is a detailed description of the basic search options in Phabricator.

The generic search is found in the upper right of every Phabricator page.

Search query addresses (URL) are stable so you can save and reuse them.

You can share the address in your web browser's address bar with other people, e.g. via posting the link on a wikipage.

To make the user name dynamic (e.g. for "Tasks assigned to the person running this query") in searches that you'd like to share with others, set "Current viewer".

Note that some common queries are also available in the "Activity" tabs on the Phabricator frontpage.

Search terms
Special care needs to be put in choosing correct search terms.

As of 2017, Phabricator is using the ElasticSearch full-text search engine which is based on Apache Lucene. In-depth knowledge of it might help searching better. Some locally-valid properties: People who don't remember the exact words used in an item they are looking for usually follow one of these paths:
 * Case insensitive:  is the same as
 * phrase search works:
 * basic tokenization is performed, e.g. to strip punctuation
 * only whole-word matches are returned by default and no morphological analysis is performed: "edited" is only found by, not by   and even less by
 * Prefix / wildcard search is possible:  will match documents with the word "errors"
 * Boolean queries are possible by using the + and - symbols before each term. E.g.  to exclude "non-fatal" errors from results. There is a detailed description of the query syntax in the ElasticSearch Query String documentation.
 * Documents matching all words are ranked higher than partial patches. The query passed to the search engine is a combination of a boolean AND with a boolean OR query, so a search for  (without quotes) is converted to something like this:   and results are ranked according to whether the exact phrase matched, followed by whether the AND query matched, followed finally by any results matching the OR query.
 * use an external search engine;
 * remove all search terms, refine the search only by project etc. and then scan all the possible results manually or use Ctrl F to search specific strings;
 * use the Bugzilla search for tasks created before November 2014 and their edits before November 2014 (docs, tips, more tips);
 * file a new task, mentioning that a past report exists as well, and wait for someone to merge the new report to the old.

Searching for tasks and bug reports
There are 2 different main task search forms:

There is also an advanced search for some of the other applications (e.g. file/query/advanced). To only search for tasks / bug reports, use the Maniphest advanced search.
 * https://phabricator.wikimedia.org/search/query/advanced/ - this one is fairly simple - it's in the top-header bar
 * https://phabricator.wikimedia.org/maniphest/query/advanced/ - this one has more fields, and auto-completion that includes "Not in:..." (equivalent to NOT) and "In any:..." (equivalent to OR) (for example, type "echo" in the "Tags" field)

The advanced search forms are not explicit about the logic they use. In general, they seem to use OR within a field (except words), AND between different fields. It's sometimes possible to specify in a field "in any", "not in", via the auto-completion suggestions.

Maniphest offers links to some predefined search queries. For example, click authored to get a list of tasks that you have created.

To get a list of tasks which were created in the last 24 hours, set the "Created After" field to "-24 hours" or "-1 day". Note that "Updated Before" actually means "Last updated before" and that absolute date values like "2014-11-26" refer to UTC time while your time zone setting might be different. (Searching for tasks that got closed within a certain timeframe is not supported — use Reports as a workaround by setting the "Recently Means" value and checking the "Recently Closed" column for your product.)

Defining your default search context
By default, the search field in the top bar of Phabricator searches all types of documents (open tasks, closed tasks, code commits, etc…).

You can change the default context using the the arrow menu to the left of the search bar. For example, select "Open Tasks" to only show results in open tasks from the Maniphest issue tracker.

Or select "Current Application" to search Maniphest in Maniphest, Diffusion in Diffusion etc.

Finding the Maniphest task corresponding to a Bugzilla bug number
All Phabricator tasks migrated from Bugzilla have a Reference field that contains a value "bz" followed by the number of the equivalent report in Bugzilla. If you want to search the task corresponding to a specific Bugzilla report, use the Reference field in the advanced search or just add 2000.