1,554
edits
(change name to More elasticsearch examples) |
|||
Line 528: | Line 528: | ||
https://api.idigbio.org/v1/mediarecords/4c4c5008-5444-4348-85f5-34112b46169b/media?quality=webview | https://api.idigbio.org/v1/mediarecords/4c4c5008-5444-4348-85f5-34112b46169b/media?quality=webview | ||
=== Elasticsearch Examples === | === More Elasticsearch Examples === | ||
Find all specimen records that meet the following criteia: | ; 1. Find all specimen records that meet the following criteia: | ||
* | * Has an image (mediarecord) associated with the specimen record | ||
* | * Is from Hocking or Fairfield County, Ohio. | ||
Note that we are not using georeference data here, we are using the "county" and "stateprovince" fields. | |||
To resolve this criteria, we need the following (expressed in pseudocode): | To resolve this criteria, we need the following (expressed in pseudocode): | ||
# hasImage is true | # "hasImage" is true | ||
# county is | # "county" is either "Hocking" or "Fairfield" | ||
# stateprovince is equal to "Ohio" (there | # "stateprovince" is equal to "Ohio" (there are multiple Fairfield counties throughout the world so we need to restrict the geography by state) | ||
The query parameter string will look something like this: | The query parameter string will look something like this: | ||
Line 562: | Line 564: | ||
"uuid" : "ba1fe9bb-1fbf-4193-b395-51436dbe3bf4", | "uuid" : "ba1fe9bb-1fbf-4193-b395-51436dbe3bf4", | ||
</pre> | </pre> | ||
; 2. Search for scientific name | |||
=== API Performance === | === API Performance === |
edits