@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
at recaptime-dev/main 194 lines 8.9 kB view raw
1@title Search User Guide 2@group userguide 3 4Introduction to searching for items and objects in Phorge. 5 6Overview 7======== 8 9Phorge has two major ways to search for items (like tasks, 10code reviews, users, wiki documents, and so on): **global search** and 11**application search**. 12 13**Global search** allows you to search across multiple document types at once, 14but has fewer options for refining a search. It's a good general-purpose 15search, and helpful if you're searching for a text string. 16 17**Application search** allows you to search within an application (like 18Maniphest) for items of a specific type. Because application search is only 19searching one type of object, it can provide more powerful options for 20filtering, ordering, and displaying the results. 21 22Both types of search share many of the same features. This document walks 23through how to use search and how to take advantage of some of the advanced 24options. 25 26 27Global Search 28============= 29 30Global search allows you to search across multiple document types at once. 31You can access global search by entering a search query in the main menu bar. 32 33By default, global search queries search all document types: for example, they 34will find matching tasks, commits, wiki documents, users, etc. You can use the 35dropdown to the left of the search box to select a different search scope. 36 37If you choose the **In Application Only** scope (instead of "Application", 38Phorge displays the actual name of the application), Phorge will search for 39open items in the current application. For example, if you're in Maniphest 40and run a search, you'll get matching tasks. If you're in Phriction and run a 41search, you'll get matching wiki documents. 42 43Some pages (like the 404 page) don't belong to an application, or belong to an 44application which doesn't have any searchable items. In these cases, 45the **In Application Only** scope is not available for selection. 46 47To quickly **jump to an object** like a task, enter the object's ID in the 48global search box and search for it. For example, you can enter `T123` or 49`D456` to quickly jump to the corresponding task or code review, or enter a Git 50commit hash to jump to the corresponding commit. For a complete list of 51supported commands, see @{article:Search User Guide: Shortcuts}. 52 53After running a search, you can scroll up to add filters and refine the result 54set. You can also press return in the search box without entering a query to go 55here immediately. 56 57This interface supports standard Phorge search and filtering features, 58like **saved queries** and **typeaheads**. See below for more details on using 59these features. 60 61 62Application Search 63================== 64 65Application search gives you a more powerful way to search one type of document, 66like tasks. Most applications provide application search interfaces for the 67items they let you create: these pages have queries in the left 68menu, show items in the main content area, and have controls 69for refining the results. 70 71These interfaces support **saved queries** and **typeaheads**. 72 73 74Saving and Sharing Queries 75============= 76 77If you have a query which you run often, you can save it for easy access. 78To do this, click "Save Custom Query..." on the result screen. Choose a name 79for your query and it will be saved in the left nav so you can run it again 80with one click. 81 82You can use "Edit Queries..." to reorder queries or remove saved queries you 83don't use anymore. 84 85If you drag a query to the top of the list, it will execute by default when 86you load the relevant search interface. You can use this to make your default 87view show the results you most often want. 88 89You can share queries with other users by sending them the URL. This will run 90the same query for them with all the parameters you've set (they may see 91different results than you do, because they may not have the same permissions). 92 93 94Typeaheads 95========== 96 97Typeaheads are text inputs which suggest options as you type. Typeaheads make 98it easy to select users, projects, document types, and other kinds of objects 99without typing their full names. 100 101For example, if you want to find tasks that a specific user created, you can 102use the "Authors:" filter in Maniphest. The filter uses a typeahead control 103to let you enter authors who you want to search for. 104 105To use a typeahead, enter the first few letters of the thing you want to 106select. It will appear in a dropdown under your cursor, and you can select it 107by clicking it (or using the arrow keys to highlight it, then pressing return). 108 109If you aren't sure about the exact name of what you're looking for, click the 110browse button ({nav icon=search}) to the right of the input. This will let you 111browse through valid results for the control. You can filter the results from 112within the browse dialog to narrow them down. 113 114Some typeaheads support advanced selection functions which can let you build 115more powerful queries. If a control supports functions, the "Browse" dialog 116will show that advanced functions are available and give you a link to details 117on which functions you can use. 118 119For example, the `members()` function lets you automatically select all of the 120members of a project. You could use this with the "Authors" filter to find 121tasks created by anyone on a certain team. 122 123Another useful function is the `viewer()` function, which works as though you'd 124typed your own username when you run the query. However, if you send the query 125to someone else, it will show results for //their// username when they run it. 126This can be particularly useful when creating dashboard panels. 127 128 129Fulltext Search 130=============== 131 132Global search and some applications provide **fulltext search**. In 133applications, this is a field called {nav Query}. 134 135Fulltext search allows you to search the text content of objects and supports 136some special syntax. These features are supported: 137 138 - Substring search with `~platypus`. 139 - Field search with `title:platypus`. 140 - Filtering out matches with `-platypus`. 141 - Quoted terms with `"platypus attorney"`. 142 - Matching entire fields with `=platypus`. 143 - Combining features with `title:~"platypus attorney"`. 144 - Testing a field for presence (`title:~`) or absence (`title:-`). 145 146See below for more detail. 147 148**Substrings**: Normally, query terms are searched for as words, so searching 149for `read` won't find items which only contain the word `threaded`, even 150though "read" is a substring of "threaded". With the substring operator, `~`, 151you can search for substrings instead: the query `~read` will match items 152which contain that text anywhere, even in the middle of a word. 153 154**Quoted Terms**: When you search for multiple terms, items which match 155each term will be returned, even if the terms are not adjacent in the document. 156For example, the query `void star` will match a document titled `A star in the 157void`, because it matches both `void` and `star`. To search for an exact 158sequence of terms, quote them: `"void star"`. This query will only match 159items which use those terms as written. 160 161**Stemming**: Searching for a term like `rearming` will find items which 162contain variations of the word, like `rearm`, `rearms`, and `rearmed`. To 163search for an an exact word, quote the term: `"rearming"`. 164 165**Field Search**: By default, query terms are searched for in the title, body, 166and comments. If you only want to search for a term in titles, use `title:`. 167For example, `title:platypus` only finds items with that term in the 168title. This can be combined with other operators, for example `title:~platypus` 169or `title:"platypus attorney"`. These scopes are also supported: 170 171 - `title:...` searches titles. 172 - `body:...` searches bodies (descriptions or summaries). 173 - `core:...` searches titles and bodies, but not comments. 174 - `comment:...` searches only comments. 175 176**Filtering Matches**: You can remove items which match certain terms from 177the result set with `-`. For example: `platypus -mammal`. Items which match 178negated terms will be filtered out of the result set. 179 180**Matching Entire Fields**: If you know the exact name of an object and want 181to find only that object, you can use the `=` operator. A query like 182`title:"warp drive"` will find a document titled "Warp Drive", but will also 183find items with longer titles, like "Not a Warp Drive". The `=` operator 184requires that the entire field match the query exactly, so //only// items 185exactly titled "Warp Drive" will be matched by the query (but note that the 186query is still case insensitive). 187 188**Present and Absent Fields**: To find objects with //any// value in a 189particular field, use `field:~` as a search term (with no additional text). For 190example, searching Maniphest for `comment:~` will find tasks with any comments. 191 192If you want to find objects that are //missing// a particular field, use 193`field:-` with no additional argument. For example, searching Maniphest for 194`body:-` will find tasks with no description.