Searching with Limiters
Before searching with a limiter, call the /edsapi/rest/info endpoint to determine the limiters available when searching the defined set of databases. Limiter types and values are passed as parameters to the /edsapi/rest/search endpoint.
Limiter Definition in the /edsapi/rest/info Response
The /edsapi/rest/info endpoint returns limiter definitions. A limiter is defined by the following properties:
Element | Description |
---|---|
ID | A unique identifier for a limiter. |
Label | A descriptive string used to identify the limiter to an end user. |
Type | Determines the type of data that’s required of the end user and the format of the data to return as a limiter’s value in a search specification. |
Values | Some limiter types provide a list of values for the user to select from. |
Limiter Search Specification
When searching with a limiter, you must specify to the /edsapi/rest/search endpoint both the limiter ID and value. The format of the value is determined by the limiter’s type.
Limiter Types
The type of limiter determines the format of the value that should be returned. The type also determines if the limiter definition will contain a ValueList. The limiter definition is returned from the /edsapi/rest/info endpoint.
Type | Format of Value | Eds Api Name |
---|---|---|
Select | Y | y | select |
Text | Any sequence of characters | text |
Numeric | Any sequence of digits (0-9) | numeric |
NumericRange | Numeric-Numeric | numericrange |
RelationalNumeric | =Numeric | >Numeric | <Numeric | relationalnumeric |
YMRange | YYYY-MM/YYYY-MM (see below for more info) | ymrange |
YRange | YYYY/YYYY (see below for more info) | yrange |
HistoricalYRange | ±YYYY/±YYYY (CE dates: +YYYY, BCE dates: -YYYY) (see below for more info) | historicyrange |
SingleSelectValue | Value selected from a limiter’s ValueList (see below for more info) | singleselectvalue |
MultiSelectValue | Multiple values selected from the limiter’s ValueList. Values are separated by a tilde (‘~’). Example: Limiter’s ValueList = [red, green, orange, blue], Selected Values = red~orange (see below for more info) | multiselectvalue |
Date Types
Date specification follows the ISO-8601 standard for specifying year and year+month. Use a forward slash, '/' to specify a range. Separate the lower and upper dates with the forward slash. When either the lower or upper dates are missing, we assume the missing date implies all dates either >= or <= the specified date. In both cases, the '/' character is required to locate which is missing.
YMRange
Format | Description |
---|---|
YYYY-MM/YYYY-MM | Between the 2 specified dates. Includes the endpoints. |
YYYY-MM/ | > = YYYY-MM |
/YYYY-MM | <= YYYY-MM |
YRange
Format | Description |
---|---|
YYYY/YYYY | YYYY/YYYY |
YYYY/ | > = YYYY |
/YYYY | <= YYYY |
HistoricalYRange
Historical Range date specification allows for both BCE and CE dates. BCE dates require a – sign. CE dates require a + sign. The year 0000 = 1 BC. So, BC is represented as +0000. This means that all BC dates must be different by 1 when converted; for example, 5 BC becomes -0004.
Format | Description |
---|---|
±YYYY-MM/±YYYY-MM | Between the 2 specified dates. Includes the endpoints. |
±YYYY-MM/ | > = ±YYYY-MM |
/±YYYY-MM | <= ±YYYY-MM |
SingleSelectValue and MultiSelectValue
This type of limiter provides a list of values from which a user picks. If multiple values are selected, the values are concatenated together with a tilde ('~') between them.
For the example below, to specify Red and Green, the value is Red~Green.
- Red
- Green
- Blue
- Yellow
- Orange
A list of values may also have child values. An example list with child values is below.
- MA Cities and Towns
- Boston
- Springfield
- Westbrook
- NY Cities and Towns
- New York
- Albany
- Westbrook
To select "Westbrook" under "NY Cities and Towns", the child value is concatenated to the parent value with a hyphen: NY Cities and Towns-Westbrook.
To select "Westbrook" in both states, the values would be separated by a tilde: NY Cities and Towns-Westbrook~MA Cities and Towns-Westbrook.
Updated about 2 months ago