IDOL Category Component 24.2

# BIASRANGE

The `BIASRANGE` field specifier (case sensitive) allows you to bias the score of result documents where a specified field contains a date that falls in the inclusive range of two dates that you specify.

NOTE: You can optimize the speed of this field specifier by restricting the field to the `NumericDateType` property type.

The IDOL Content component applies a scoring profile that increases from a minimum date to an optimum range lower value. It has the maximum weight change for values between the optimum lower and optimum upper range values, and then decreases again to a maximum date.

## Format

    FieldText=BIASRANGE{lowerOptimum,upperOptimum,lowerRange,upperRange,percentage}:yourField

`lowerOptimum` | The earliest date that `yourField` can contain to change the weight by the maximum `percentage`. You can specify an open-ended date, by setting this value to a period (`.`).
`upperOptimum` | The latest value that `yourField` can contain to change the weight by the maximum `percentage`. You can specify an open-ended date, by setting this value to a period (`.`).
`lowerRange` | The number of seconds before the `lowerOptimum` to apply a weight change. When `yourField` contains a date that is between (`lowerOptimum`-`lowerRange`) and `lowerOptimum`, Content increases or decreases the weight according to the specified `percentage`, using a linear scale.
`upperRange` | The number of seconds after the `upperOptimum` to apply a weight change. When `yourField` contains a date that is between `upperOptimum` and (`upperOptimum`+`upperRange`), Content increases or decreases the weight according to the specified `percentage`, using a linear scale. NOTE: To use the same value for `lowerRange` and `upperRange`, you can omit this argument.
`percentage` | A percentage in the range -100 to 100. The percentage change to apply to dates that occur in the optimum range. (The boosted relevance score cannot be greater than 100% or less than -100%.) For dates outside the optimum range, but inside the range set by `lowerRange` and `upperRange`, Content adjusts the percentage on a linear scale. When you set `AbsWeight` to `True`, this value is the absolute value by which to boost the weight and it is then not limited by +/- 100.
`yourField` | The name of the field that must be present, and must contain a value in the specified date range, for the document relevance to be modified.

You can use the following formats to specify your dates:

Date formats

Format | Explanation
--- | ---
`D+/M+/#YY+` | A date. For example, `1/3/05`, `23/12/1999`, `10/07/40`, or `8/5/2012`. 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, `01/02/01` is read as 1 February 2001, and `01/03/40` is read as 1 March 1940. 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, `10:30:45 1/3/05`, `18:55:00 23/12/99`, `01:23:45 10/07/1940`, or `07:15:00 8/5/2012`. 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, `01/02/01` is read as 1 February 2001, and `01/03/40` is read as 1 March 1940. 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, `2017-05-02T12:45:00Z`, or `2017-05-02T12:45:00+0000`.
`HH:NN:SS D+/M+/#YY+ #ADBC` | A time and date with a time period. For example, `10:30:45 1/3/05 AD`, `18:55:00 23/12/99 CE`. For the time period, you can use `AD`, `CE`, `BC`, `BCE`, or any predefined list of EPOCH indicators. 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, `–1` specifies yesterday's date, `0` specifies today's date, `1` specifies tomorrow's date, `2` specifies two days from now (the current date plus two), and so on.
`Ns` | A positive or negative number of seconds from now. For example, `–60s` specifies one minute ago, `–900s` specifies 15 minutes ago, `–3600s` specifies one hour ago and so on. `60s` specifies one minute from now, `900s` specifies 15 minutes from now, `3600s` specifies one hour from now, and so on.
`Ne` | Epoch seconds (seconds since 1 January 1970 UTC). For example, `1012345000e` specifies 22:56:40 on 29 January 2002 UTC.

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`.

## Examples

    BIASRANGE{21/08/2011,25/08/2011,172800,86400,10}:DATE

A document whose `DATE` field value is within the date range 21/08/2011 to 25/08/2011 (inclusive) receives the full weight increase of 10%.

If a date is within 172800s (two days) before 21/08/2011, its weight is increased on a linear scale from 10% if the date is 21/08/2011, to 0% if the date is 19/08/2011. So, if a document has a `DATE` field of 20/08/2011, which is half way in this interval, it is boosted by 0.5*10=5%. Similarly, if a date is within 86400s (one day) after 25/08/2011, its weight is increased on a linear scale from 10% if the date is 25/08/2011, to 0% if the date is 26/08/2011.

    BIASRANGE{21/08/2011,25/08/2011,172800,86400,-10}:DATE

A document whose `DATE` field value is within the date range 21/08/2011 to 25/08/201150 (inclusive) receives the full weight decrease of -10%.

If a date is within 172800s (two days) before 21/08/2011, its weight is decreased on a linear scale from -10% if the date is 21/08/2011, to 0% if the date is 19/08/2011. So if a document has a `DATE` field of 20/08/2011, which is half way in this interval, its score is reduced by 0.5*10=5%. Similarly, if a date is within 86400s (one day) after 25/08/2011, its weight is decreased on a linear scale from -10% if the date is 25/08/2011, to 0% if the date is 26/08/2011.

    BIASRANGE{21/08/2011,25/08/2011,86400,10}:DATE

This example has a single range argument, which means Content uses the same range for the lower and upper ranges.

A document whose `DATE` field value is within the date range 21/08/2011 to 25/08/2011 (inclusive) receives the full weight increase of 10%. If a date is within 86400s (one day) before 21/08/2011, its weight is increased on a linear scale from 10% if the date is 21/08/2011, to 0% if the date is 20/08/2011. Similarly, if a date is within 86400s after 25/08/2011, its weight is increased on a linear scale from 10% if the date is 25/08/2011, to 0% if the date is 26/08/2011.

    BIASRANGE{.,25/08/2011,86400,-10}:DATE

This example uses an open ended range. It modifies the scores for all documents that have a `DATE` field value up to 25/08/2011 (inclusive). If a date is within 86400s after 25/08/2011, its weight is increased on a linear scale from 10% if the date is 25/08/2011, to 0% if the date is 26/08/2011.

Copyright 2024 Open Text
Version 24.2 | Last updated March 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL IDOL Category Component 24.2

Topic Title: BIASRANGE