From 4655a5f059c43db4ca1a8b82c12713e686bc6608 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 14 Apr 2020 10:30:35 -0700 Subject: [PATCH] Document the "field present" and "field absent" operators in Ferret Summary: Ref T13509. Adds documentation for the new operators. Test Plan: Read documentation, tried examples, got sensible-seeming results. Maniphest Tasks: T13509 Differential Revision: https://secure.phabricator.com/D21112 --- src/docs/user/userguide/search.diviner | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/docs/user/userguide/search.diviner b/src/docs/user/userguide/search.diviner index f1b32e7dc7..9276298f31 100644 --- a/src/docs/user/userguide/search.diviner +++ b/src/docs/user/userguide/search.diviner @@ -140,6 +140,7 @@ some special syntax. These features are supported: - Quoted terms with `"platypus attorney"`. - Matching entire fields with `=platypus`. - Combining features with `title:~"platypus attorney"`. + - Testing a field for presence (`title:~`) or absence (`title:-`). See below for more detail. @@ -169,7 +170,7 @@ or `title:"platypus attorney"`. These scopes are also supported: - `title:...` searches titles. - `body:...` searches bodies (descriptions or summaries). - `core:...` searches titles and bodies, but not comments. - - `comments:...` searches only comments. + - `comment:...` searches only comments. **Filtering Matches**: You can remove documents which match certain terms from the result set with `-`. For example: `platypus -mammal`. Documents which match @@ -182,3 +183,11 @@ find documents with longer titles, like "Not a Warp Drive". The `=` operator requires that the entire field match the query exactly, so //only// documents exactly titled "Warp Drive" will be matched by the query (but note that the query is still case insensitive). + +**Present and Absent Fields**: To find objects with //any// value in a +particular field, use `field:~` as a search term (with no additional text). For +example, searching Maniphest for `comment:~` will find tasks with any comments. + +If you want to find objects that are //missing// a particular field, use +`field:-` with no additional argument. For example, searching Maniphest for +`body:-` will find tasks with no description.