Skip to content

Commit a525532

Browse files
committed
Clarify applicable fields
1 parent 288de2d commit a525532

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919

2020
This defines a new parameter, `q` that allows the user to perform free-text queries against STAC metadata.
2121
The value of the parameter is a string and is passed to the underlying backend for free-text searches.
22-
The specific set of text fields to which the parameter is applied is left to the discretion of the implementation, but a recommendation is to at least consider `title`, `description` and `keywords`. It is also allowed to query against all text fields.
22+
The specific set of text fields to which the parameter is applied is left to the discretion of the implementation,
23+
but a recommendation is to at least consider:
24+
- Collections: `title`, `description` and `keywords`
25+
- Catalog: `title`, `description`
26+
- Item: all relevant textual properties
27+
It is also allowed to query against all text fields.
2328

2429
This extension sits somewhere between the basic API and the [Filter Extension](https://github.com/radiantearth/stac-api-spec/tree/master/fragments/filter) providing
2530
more powerful query features than the raw API but without the flexibility and increased operators of the filter plugin. This should mostly be used to provide
@@ -63,13 +68,13 @@ Any of the search terms must be present in the set of text fields (OR operaror).
6368

6469
| URL Example | Summary | Detail |
6570
| ----------- | ------- | ------ |
66-
| `/search?q=sentinel` | Free-text query against all properties | This will search for any matching items where `properties.*` CONTAINS `"sentinel"` |
67-
| `/search?q="climate model"` | Free-text search using exact | This will search for any matching items where `properties.*` CONTAINS the exact phrase `"climate model"` |
68-
|`/search?q=climate model`| Using `OR` term match (**Default**) | This will search for any matching items where `properties.*` CONTAINS `"climate"` OR `"model"`|
69-
|`/search?q=climate OR model`| Using `OR` term match (**Default**) | This will search for any matching items where `properties.*` CONTAINS `"climate"` OR `"model"`|
70-
|`/search?q=climate AND model`| Using `AND` term match | This will search for any matching items where `properties.*` CONTAINS `"climate"` AND `"model"`|
71-
| `/search?q=(quick OR brown) AND fox` | Parentheses can be used to group terms | This will search for matching items where `properties.*` CONTAINS `"quick"` OR `"brown"` AND `"fox"` |
72-
| `/search?q=quick +brown -fox` | Indicate included and excluded terms using `+`/`-` | This will search for items where `properties.*` INCLUDES `"brown"` EXCLUDES `"fox"` OR CONTAINS `"quick"` |
71+
| `/search?q=sentinel` | Free-text query against all properties | This will search for any matching items that CONTAIN `"sentinel"` |
72+
| `/search?q="climate model"` | Free-text search using exact | This will search for any matching items that CONTAIN the exact phrase `"climate model"` |
73+
|`/search?q=climate model`| Using `OR` term match (**Default**) | This will search for any matching items that CONTAIN `"climate"` OR `"model"`|
74+
|`/search?q=climate OR model`| Using `OR` term match (**Default**) | This will search for any matching items that CONTAIN `"climate"` OR `"model"`|
75+
|`/search?q=climate AND model`| Using `AND` term match | This will search for any matching items that CONTAIN `"climate"` AND `"model"`|
76+
| `/search?q=(quick OR brown) AND fox` | Parentheses can be used to group terms | This will search for matching items that CONTAIN `"quick"` OR `"brown"` AND `"fox"` |
77+
| `/search?q=quick +brown -fox` | Indicate included and excluded terms using `+`/`-` | This will search for items that INCLUDES `"brown"` EXCLUDES `"fox"` OR CONTAIN `"quick"` |
7378

7479
### HTTP POST
7580

0 commit comments

Comments
 (0)