Understanding Sun Master Index Configuration Options (Repository)

Basic Query Range Searching

Range searching for basic queries is configured in the search page section of the Enterprise Data Manager file by tagging the field with a “choice” attribute. When you specify a field for range searching, two corresponding fields appear on the EDM with “From” and “To” appended to the name (for example, a field named “Date of Birth” would display two fields: “Date of Birth From” and Date of Birth To”). You can also define a field for both exact and range searching by defining the field twice for the search page, once with the choice attribute set to “exact” and once with it set to “range”. In this case, three fields appear on the EDM: one with the given field name, one with “From” appended to the name, and one with “To” appended to the name.

Table 3 describes the queries formed for different exact or range search scenarios. Table 4 describes the queries formed for combination exact and range search scenarios.

The following variables are used in these tables:

Table 3 Standard Range Queries

Field Configuration in the Enterprise Data Manager file 

Resulting Fields on EDM 

Fields Populated for Search 

Where Clause 

choice attribute set to “exact”

field_name

field_name

where field_name = value

choice attribute set to “range”

field_name From

field_name To

field_name From

field_name To

where field_name >= value_from and field_name <= value_to

choice attribute set to “range”

field_name From

field_name To

field_name From

where field_name >= value_from

choice attribute set to “range”

field_name From

field_name To

field_name To

where field_name <= value_to

In the following table, when field_name is populated but not used in the WHERE clause, its value is used for weighting purposes. These cases are marked with an asterisk (*).

Table 4 Combination Exact and Range Queries

Field Configuration in the Enterprise Data Manager file 

Resulting Fields on EDM 

Fields Populated for Search 

Where Clause 

field defined once with choice attribute set to “exact” and once with it set to “range”

field_name

field_name From

field_name To

field_name

where field_name = value

field defined once with choice attribute set to “exact” and once with it set to “range”

field_name

field_name From

field_name To

field_name From

field_name To

where field_name >= value_from and field_name <= value_to

field defined once with choice attribute set to “exact” and once with it set to “range”

field_name

field_name From

field_name To

field_name From

where field_name >= value_from

field defined once with choice attribute set to “exact” and once with it set to “range”

field_name

field_name From

field_name To

field_name To

where field_name <= value_to

field defined once with choice attribute set to “exact” and once with it set to “range” *

field_name

field_name From

field_name To

field_name

field_name From

where field_name >= value_from

field defined once with choice attribute set to “exact” and once with it set to “range” *

field_name

field_name From

field_name To

field_name

field_name To

where field_name <= value_to

field defined once with choice attribute set to “exact” and once with it set to “range” *

field_name

field_name From

field_name To

field_name

field_name From

field_name To

where field_name >= value_from and field_name <= value_to