The Selected Category Matches sort order option allows search results to be ordered based on how closely each result matches the categories selected by the visitor.
This option is useful when your interface includes category filters and you want locations with more matching selected categories to appear higher in the results.
What It Does
When a visitor selects one or more categories in the search form, MetaLocator can calculate how many of those selected categories are assigned to each matching location.
The Selected Category Matches sort order uses that match count to sort the results.
For example, if a visitor selects:
Residential
Commercial
Emergency Service
A location assigned to all three selected categories will be ranked higher than a location assigned to only one of those categories.
When to Use This Sort Order
Use Selected Category Matches when category relevance should influence the order of search results.
This is especially helpful for interfaces where visitors may select multiple categories and expect the best-matching locations to appear first.
Common use cases include:
Dealer or service provider locators with multiple specialties
Product or service category filters
Store locators where locations carry different product lines
Directories where users can select several capabilities or attributes at once
How It Works
When Selected Category Matches is used as a sort field, MetaLocator compares each result’s assigned categories against the categories selected in the current search.
Results with more matching selected categories can be sorted higher or lower depending on the configured sort direction.
MetaLocator also uses category order as a secondary factor when calculating this sort value, helping provide a consistent order when multiple results have the same number of selected category matches.
Configuring Selected Category Matches Sorting
Login to MetaLocator
Click Interfaces
Click Edit to open the Interface Builder.
Click Filter & Sort
Locate the Field Sorting setting.
Click Add Sorter to Add a sort field.
Select Selected Category Matches.
Choose the desired sort direction.
For most use cases, use Descending order so locations with the most selected category matches appear first.
Recommended Configuration
A typical configuration is:
Sort Field | Direction |
Selected Category Matches | Descending |
Distance | Ascending |
This places locations with the strongest category match first, while still using distance to organize results within similar match groups.
Example
Suppose a visitor selects these categories:
Installation
Repair
Warranty Service
The results may be sorted like this:
Location | Matching Selected Categories | Result Priority |
Location A | 3 | Highest |
Location B | 2 | Medium |
Location C | 1 | Lower |
In this example, Location A appears first because it matches all three selected categories.
Notes and Limitations
Selected Category Matches only affects sorting when category selections are present in the search request.
If no categories are selected, there are no selected category matches to compare. In that case, other configured sort fields should be used to determine the final result order.
For best results, pair this option with a secondary sort order such as Distance, Name, or another field that provides predictable ordering when category match counts are the same.
