Ranges
The Ranges
parameter allows you to define ranges of values to use in the parametric results.
By default, IDOL Content Component uses parametric ranges when FieldName specifies a ParametricRangeType field, and it automatically calculates the appropriate values for ranges, according to the value of the Ranges configuration parameter. The Ranges
action parameter allows you to specify the exact ranges to use, and allows you to create ranges for fields that are not configured as ParametricRangeType.
You can use Ranges
to specify a numeric range or a date range, by using the FIXED
and FIXEDDATE
operators respectively:
These operators use the format:
Ranges=FIXED{RangeSpecifiers}:FieldNames
or
Ranges=FIXEDDATE{RangeSpecifiers}:FieldNames
where,
RangeSpecifiers
|
is a comma-separated list of the boundaries of the ranges that you want to use. You must specify at least two values, in increasing numeric or date order. You can use a period ( The ranges are lower bound inclusive, and upper bound exclusive. For example, if you specify For numeric values in the For date values in the |
FieldNames
|
is the name of one or more fields that you want to return the range values for. You must also list these fields in the FieldName parameter. Separate multiple field names with colons ( For the You can use Wildcards to specify normal fields, but you must explicitly list any user metafields. |
To specify multiple range sets for different fields, separate each group with a plus symbol.
NOTE: If you specify multiple range groups, and the same field name matches more than one set (for example, because of a Wildcard), the result returns only the first range that matches.
Actions: | GetQueryTagValues |
Type: | Boolean |
Default: | False |
Example: | Ranges=FIXED{.,50,100,150,200,.}:PRICE+FIXEDDATE{.,13/03/2017,12:00:00 13/03/2017,10/03/2017,.}:autn_date:NUMDATE2
|
See Also: | ParametricRangeType configuration parameter Ranges configuration parameter |
Allowed Date Formats
You can use the following formats to specify your dates:
Format | Explanation |
---|---|
D+/M+/#YY+
|
A date. For example, If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, IDOL Server treats the date as a date in its local timezone. |
YYYY-MM-DD
|
A date in ISO-8601 format. For example, 2017-05-12 |
HH:NN:SS D+/M+/#YY+
|
A time and date. For example, If the year is a number less than 40, it is read as a year in the 2000s. If the year is a number between 40 and 99, it is read as a year in the 1900s. For example, IDOL Server treats the date as a date in its local timezone. |
YYYY-MM-DDTHH:NN:SSZ
YYYY-MM-DDTHH:NN:SS±HHMM
|
A date and time in ISO-8601 formats, with a time zone (either as a literal Z, or a four digit time zone offset). For example, |
HH:NN:SS D+/M+/#YY+ #ADBC
|
A time and date with a time period. For example, For the time period, you can use IDOL Server treats the date as a date in its local timezone. |
N
|
A positive or negative number of days from the current date. For example, |
Ns
|
A positive or negative number of seconds from now. For example, |
Ne
|
Epoch seconds (seconds since 1 January 1970 UTC). For example, |
NOTE: IDOL Server treats any date that does not have explicit timezone information as a date in the local timezone, both in the index and in your query parameters. This behavior might result in non-intuitive matches.
For example, epoch second values are always UTC. The value 1012345000e
matches times as 22:56:40 on 29 January 2002 UTC. If your local timezone is GMT-6, this query might match an indexed date value of 03:56:40 on 29 January 2002 (which corresponds to the same time UTC), because the indexed date is in your local timezone.
Similarly, if your query date is 03:56:40 29/01/2002
, this might match an indexed epoch seconds date of 1012345000
.