Overview
The Special Results settings allow you to reserve one result position in paginated locator search results for a specific type of location.
This is useful when you want to ensure that a certain type of result appears in the results list without allowing that type of result to overwhelm the rest of the search results.
For example, if your data includes a large number of locations tagged as Big Box Retailers, you may want to show only one Big Box Retailer per page of results while still allowing other nearby location types to appear.
Special Results settings are available in the Interface Builder under Filter & Sort
When to Use Special Results
Use Special Results when you want to include a single, specific location in a predictable position within each page of search results.
Common examples include:
Show only one result of type "Retailer" per page of results
Show a specific featured location at the end of each page of results
Show one location with a custom field set to a specific value in each page of results
Special Results are especially applicable when one category, or location type appears much more frequently than others and would otherwise dominate the normal distance-based search results.
How Special Results Work
When Special Results are configured, MetaLocator performs an additional query for a matching special result. If a matching special result is found, it is inserted into the configured result position.
MetaLocator excludes those records matching the special result criteria from the "normal" results.
The special result is then inserted into either the first or last result position depending on the selected option.
For example, if the interface displays 10 results per page and the special result position is set to Last, the first 9 results are normal results and the 10th result is the matching special result.
If no matching special result is found for the current page of results, the page is filled with normal results.
Settings
The following settings are found in the Interface Builder under Filter & Sort.
Special Result Field
The field name used to query special results.
Examples:
tag id state location_type
Use this setting to identify which field should be searched when finding the special result.
For example, to find locations with a specific Category, provide tag for the value for this setting.
Special Result Value
The field value used to query special results.
Examples:
3 1321 WI Home Center
Use this setting to identify the value that should be matched by the special result query.
Example:
Special Result Field: state Special Result Value: WI
This configuration finds a special result where the state is WI.
Example:
Special Result Field: tag Special Result Value: 3
This configuration finds a special result assigned to tag ID 3.
Special Result Position
Controls where the special result is inserted in the results list.
Available positions:
First Last
Use this setting to determine whether the matching special result should appear at the beginning or end of the current page of results.
Example:
Special Result Position: Last
This places the special result in the last visible result slot.
Example:
Special Result Position: First
This places the special result in the first visible result slot.
What Happens if No Special Result Is Found?
If no matching special result is found, MetaLocator will continue showing normal results. The locator will not display an error to the visitor. This means Special Results can be safely configured even when not every search has a matching special result.
Notes and Best Practices
Use a field and value combination that uniquely identifies the type of result you want to include.
If the special result should represent a category, use the id as the Special Result Value and tag as the Special Result Field name.
If the special result should be a specific location, use the location ID as the field/value pair.
Consider placing special results in the Last position when the goal is to keep normal distance-based results prominent.
Consider placing special results in the First position when the special result should be emphasized.
