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:
field_name is the field name as specified in the search page section of the Enterprise Data Manager file (the field named field_name is used for exact searching)
value is the value entered into the exact search field
value_from is the value entered into the field_name From field
value_to is the value entered into the field_name To field
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 |