SearchStax Site Search uses relevance scores to compare matching results for a visitor's query. A score is not an absolute quality rating for a page. It is a calculated value that helps order matching results for that query, that index, and that SearchStax configuration.
A simplified model is:
Relevance = what matched + where it matched + how strong the signal was + boosts and other ordering signals
The actual score depends on the query, query terms after analysis, configured Search Fields, field statistics such as term frequency and field length, Ranking configuration, Rules, Promotions, Smart Ranking, Sorting settings, and indexed data. This article explains the main factors that can affect relevance scoring. It does not describe every scoring detail for every configuration.
Default Relevance Model
SearchStax Site Search uses Solr relevance behavior. In the default relevance model, SearchStax uses BM25 scoring to estimate how strongly a result matches a query. This means a result can appear even when it does not contain every query term. Each matched term can still contribute to the relevance score, along with field matches, boosts, and other ordering signals.
At a high level, Site Search ranks results based on four questions:
- What matched? Which query terms matched the document after analysis.
- Where did it match? Which configured Search Fields contained those matches.
- How strong was the signal? How term frequency, inverse document frequency, and field length affected the score.
- Did boosts or ordering settings add influence? Which Ranking boosts, Rules, Promotions, Smart Ranking, sort settings, or other ordering signals affected the result.
No single relevance setting controls the final order in every situation. If results are explicitly sorted by a field or function, that sort setting can override relevance-based order.
Matching Starts With Query Terms After Analysis
SearchStax does not look for the raw words exactly as typed in every field. The query and indexed content can be processed during analysis, depending on the field type and configured analyzers. Text fields are usually better for Search Fields because they can support tokenized, analyzed keyword matching. String fields are usually better for exact values, filters, facets, and structured Ranking signals.
When configured, stopwords and synonyms can also affect matching. Stopwords can reduce noise from common words that do not help distinguish useful results. Synonyms can connect related terms when visitors and site owners use different words for the same concept. For example, synonyms can help match courses with classes or physician with doctor without requiring a separate Rule for each term.
For a query such as site search, scoring can consider the terms site and search after analysis. With OR matching, a result may not need to match every term to appear. Each matched term can contribute independently to the score, depending on configuration.
A result that matches both site and search usually has more scoring opportunities than a result that matches only site, but partial matches can still appear if they are allowed and have enough other signals.
Search Fields Define Where Matching Can Happen
Search Fields define the indexed fields that SearchStax searches when matching a user query. A field that is not included in Search Fields cannot contribute text matching through Search Fields, even if the field exists in the index.
A match in a focused field, such as title, heading, or description, often provides a stronger relevance signal than the same term in a long body field. Focused fields usually describe the main topic of a result. Body fields often contain many topics and common terms.
Not every indexed field is a good Search Field. Broad fields can increase recall, but they can also create noisy matches. Exact-value or string-oriented fields may be useful for filters, facets, data matching, or Ranking signals, but they are not usually useful for broad text matching.
eDisMax Evaluates Terms Across Search Fields
At a high level, eDisMax evaluates a visitor's query against configured Search Fields. Depending on the configuration, it can also apply field weights, phrase boosting, and boost functions.
For each query term, SearchStax evaluates configured Search Fields, and the strongest matching field can contribute most to the document score for that term. Depending on the configuration, scoring can also reflect matches in other fields, boost settings, and other relevance signals.
For example, if search appears in both title and body, the title match may be the stronger signal when title is a focused field or has more influence in Ranking. A body match can still help the result match the query, but it may not be the strongest reason the result ranks where it does.
BM25 Estimates Match Strength
SearchStax uses BM25 scoring to estimate how strongly a result matches a query. BM25 is a relevance scoring method that weighs how often a query term appears, how rare that term is across the index, and how concentrated the match is within the searched field.
With BM25 scoring, a shorter, focused result can rank above a longer result that repeats a term many times. It considers term frequency, inverse document frequency, and field length normalization.
A simplified term-score pattern is:
Term score = term frequency effect x inverse document frequency effect x field or query influence
Actual scores vary by query, configuration, field statistics such as term frequency and field length, and indexed data.
Term Frequency
Term frequency measures how often a query term appears in a field. More occurrences can increase the score, but the increase is not unlimited. After a point, repeating the same term usually adds less value.
This helps prevent a long page from winning only because it repeats a common term many times. A body field that mentions a term repeatedly can still be less useful than a title or description that matches the visitor's intent more directly.
Inverse Document Frequency
Inverse document frequency measures how rare a term is across indexed content. Rare terms usually contribute more to scoring because they help distinguish one result from many similar results. Common terms usually contribute less because they appear in many places.
For example, a specific program name is usually a stronger signal than a common word such as page, information, or search. This is one reason broad or short queries can be difficult to tune.
Field Length Normalization
Field length normalization reduces the advantage of long fields. A match in a short title or description can be stronger than the same match in a long body field because the shorter field is usually more focused.
This is why body content can be useful for recall but risky for precision. Body content can help SearchStax find more possible matches, but it can also introduce weak matches that compete with more useful results.
Boosts Increase Signal Influence
Ranking boosts influence scoring. They do not add a fixed number to every document's default score, and they do not reserve a position in the result list. They amplify the importance of a signal, and the final impact depends on how strong that signal already is.
A field boost increases the influence of matches in a field. For example, when title has more influence, a title match can become stronger than a body-content match for the same query term.
A Field Value boost increases the influence of results with a specific structured value. For example, a content type or page type boost can help a reliable group of pages become more visible across relevant queries.
A function boost can use a calculated signal, such as recency or distance, when that signal is supported and configured for the use case.
Example: How Multiple Signals Affect Result Order
Suppose a visitor searches for site search. Search Fields include title and description, and Ranking uses ContentType_ss as a structured field value boost.
| Document | Title | Description | Content type |
|---|---|---|---|
| A | Site Search Overview | Mentions search several times | documentation |
| B | Search Optimization Guide | Mentions search and site several times | blog |
| C | Site Settings | Mentions site several times | documentation |
Before boosts, Document A may rank highest because it matches both query terms in a focused field. Document B may rank next because it has repeated matches in the description. Document C may rank lower because it matches only one query term in the configured Search Fields.
If you boost title matches, Document A can receive a higher relevance score because it already has both terms in the title. Document C can also receive additional weight from its title match. Document B may still rank highly if it has stronger matching signals in other fields.
If you also boost the documentation content type, Document C may move above Document B because it receives a structured boost tied to a business priority. That does not mean the content type alone made Document C the best match. It means the content type boost was one of several signals that affected the final score.
This example shows why result order can change after a boost is applied. SearchStax calculates relevance from multiple signals together. It combines text matches, field matches, field statistics such as term frequency and field length, and boosts as part of scoring.
Sorting, Rules, Smart Ranking, and Promotions Can Change Result Order
If results are explicitly sorted by a field or function instead of relevance score, the displayed order may not follow the score alone. Review sort settings when result order does not respond to relevance tuning.
Rules, Smart Ranking, and Promotions can also change visible result order. Rules can apply query-triggered behavior, Smart Ranking can reorder results when enabled, and Promotions can place selected items at the top of results for matching trigger queries.
Use Relevance Signals to Troubleshoot Result Order
When result order looks wrong, review the factors that contributed to scoring instead of assuming one setting failed. Use this checklist with the test queries and top results from your baseline. If you cannot inspect indexed fields or configuration details directly, work with the team that manages the Search Profile and indexing configuration.
Ask:
- Did the expected result match the query terms after analysis?
- Did it match in a high-value field such as title, description, heading, or summary?
- Did another result match more terms, rarer terms, or stronger fields?
- Did a broad body field create many weak matches?
- Did the boosted field exist and contain the expected value?
- Did a sort setting, Rule, Smart Ranking, Promotion, or other Ranking factor affect the displayed order?
- Did the results used for Smart Answers or Smart Ranking start from useful top-ranked results?
Start with Search Fields and broad Ranking changes. Use Rules for query-specific behavior and Promotions for fixed promoted placement.
For more information about Solr relevance concepts, see the Apache Solr relevance documentation.
To prepare a test query set and review usable fields before tuning, see Prepare to Tune Search Relevance.
To configure Search Fields and Ranking, see Improve Result Order with Search Fields and Ranking.
To diagnose boosts, broad queries, noisy Search Fields, or AI-powered result issues, see Troubleshoot Ranking and Broad Query Results.