From edfa4d0d28bb49c2c541850f49c7cf2edc22e9f2 Mon Sep 17 00:00:00 2001 From: mpl Date: Fri, 10 Aug 2018 21:54:50 +0200 Subject: [PATCH] website: document raw search operator And sort operators. Change-Id: I0f8fb24db15421ea819bfa3381d574a0b213cef5 --- doc/search-ui.md | 74 +++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/doc/search-ui.md b/doc/search-ui.md index a91dabb47..2a7d03959 100644 --- a/doc/search-ui.md +++ b/doc/search-ui.md @@ -35,14 +35,21 @@ escaping. For example: **after** : date format is RFC3339, but can be shortened as required. -**before** -: i.e. `2011-01-01` is Jan 1 of year 2011, and `2011` means the same. - **attr** : match on attribute. Use attr:foo:bar to match nodes having their foo attribute set to bar, or attr:foo:~bar to match nodes whose foo attribute contains bar (case insensitive substring match). +**before** +: i.e. `2011-01-01` is Jan 1 of year 2011, and `2011` means the same. + +**childrenof** +: Find child permanodes of a parent permanode (or prefix of a parent permanode): + `childrenof:sha1-527cf12` + +**filename** +: search for permanodes of files with this filename (case sensitive) + **format** : file's format (or MIME-type) such as jpg, pdf, tiff. @@ -50,6 +57,26 @@ escaping. For example: : image has a location (GPSLatitude and GPSLongitude can be retrieved from the image's EXIF tags). +**height** +: use `height:min-max` to match images having a height of at least min and at most + max. Use `height:min-` to specify only an underbound and `height:-max` to specify + only an upperbound. Exact matches should use `height:480` + +**is:image** +: object is an image + +**is:landscape** +: the image has a landscape aspect + +**is:like** +: the object is a liked tweet + +**is:pano** +: the image is panoramic: its width to height ratio is greater than or equal to 2.0. + +**is:portrait** +: the image has a portrait aspect. + **loc** : uses the available metadata, such as EXIF GPS fields, or check-in locations, to match nodes having a location near the specified location. Locations are @@ -75,25 +102,17 @@ escaping. For example: rest of whole expression (regardless of its position within the expression), logical 'or's around it are forbidden. -**is:like** -: object is a liked tweet +**parentof** +: Find parent permanodes of a child permanode (or prefix of a child permanode): + `parentof:sha1-527cf12` -**is:image** -: object is an image +**raw** +: matches the given JSON [search constraint](https://perkeep.org/pkg/search#Constraint).
+ `raw:{"permanode": {"attr": "camliContent", "valueInSet": {"file": {"mediaTag": {"tag": "title", "string": {"hasPrefix": "Bohemian"}}}}}}` -**is:landscape** -: the image has a landscape aspect - -**is:pano** -: the image is panoramic: its width to height ratio is greater than or equal to 2.0. - -**is:portrait** -: the image has a portrait aspect. - -**height** -: use `height:min-max` to match images having a height of at least min and at most - max. Use `height:min-` to specify only an underbound and `height:-max` to specify - only an upperbound. Exact matches should use `height:480` +**ref** +: matches nodes whose blobRef starts with the given substring: + `ref:sha1-527cf12` **tag** : match on a tag @@ -102,18 +121,3 @@ escaping. For example: : use width:min-max to match images having a width of at least min and at most max. Use width:min- to specify only an underbound and width:-max to specify only an upperbound. Exact matches should use `width:640` - -**filename** -: search for permanodes of files with this filename (case sensitive) - -**childrenof** -: Find child permanodes of a parent permanode (or prefix of a parent permanode): - `childrenof:sha1-527cf12` - -**parentof** -: Find parent permanodes of a child permanode (or prefix of a child permanode): - `parentof:sha1-527cf12` - -**ref** -: matches nodes whose blobRef starts with the given substring: - `ref:sha1-527cf12`