-
Notifications
You must be signed in to change notification settings - Fork 5
Query Format
godfoder edited this page Oct 8, 2014
·
28 revisions
The iDigBio query format is intended to be an easy to write query format for our APIs. Its basic structure consists of a JSON dictionary, with one or more top-level keys that reference fields in our indexes (See: Index Fields)
A basic multi-field query looks like this:
{
"scientificname": {
"type": "exists"
},
"family": "asteraceae"
}
{
"scientificname": {
"type": "exists"
}
}{
"data": {
"type": "fulltext",
"value": "aster"
}
}{
"family": "asteraceae"
}{
"family": [
"asteraceae",
"fagaceae"
]
}{
"hasImage": true
}{
"minelevation": {
"type": "range",
"gte": "100",
"lte": "200"
}
}{
"type": "range",
"gte": "1800-01-01",
"lte": "1900-01-01"
}{
"geopoint": {
"type": "geo_bounding_box",
"top_left": {
"lat": 19.23,
"lon": -130
},
"bottom_right": {
"lat": -45.1119,
"lon": 179.99999
}
}
}