The RELRANK_STRATEGY element contains a list of relevance ranking strategies that affect the order in which search results are returned to a user.
Each sub-element of RELRANK_STRATEGY represents a specific type of strategy. If you want several relevance ranking strategies to affect search results, then the order of the sub-elements, which represent the strategies, is significant. The order of the sub-elements defines the order in which the strategies are applied to the search results.
<!ELEMENT RELRANK_STRATEGY ( RELRANK_STATIC | RELRANK_EXACT | RELRANK_PHRASE | RELRANK_APPROXPHRASE | RELRANK_GLOM | RELRANK_SPELL | RELRANK_FIELD | RELRANK_MAXFIELD | RELRANK_INTERP | RELRANK_FREQ | RELRANK_WFREQ | RELRANK_NTERMS | RELRANK_PROXIMITY | RELRANK_FIRST | RELRANK_NUMFIELDS | RELRANK_MODULE )+> <!ATTLIST RELRANK_STRATEGY NAME CDATA #REQUIRED >
The RELRANK_STRATEGY element has the following attribute.
NAME
Specifies the name of the strategy.
The following table provides a brief overview of the RELRANK_STRATEGY sub-elements.
Sub-element | Brief description |
---|---|
RELRANK_STATIC | Assigns a constant score to each result, depending on the type of search operation perform. |
RELRANK_EXACT | Groups results into strata based on how well they match the query string, with the highest stratum containing results that match the user's query exactly. |
RELRANK_PHRASE | Considers results containing the user’s query as an exact phrase, or a subset of the exact phrase, to be more relevant than matches simply containing the user’s search terms scattered throughout the text. |
RELRANK_APPROXPHRASE | Not supported. |
RELRANK_GLOM | Ranks single-field matches ahead of cross-field matches. |
RELRANK_SPELL | Ranks true matches ahead of spelling-corrected matches. |
RELRANK_FIELD | Assigns a score to each result based on the static rank of the attribute member of the search interface that caused the document to match the query. |
RELRANK_MAXFIELD | Similar to the Field strategy, except it selects the static field-specific score of the highest-ranked field that contributed to the match. |
RELRANK_INTERP | A general-purpose strategy that assigns a
score to each result document based on the query processing techniques used to
obtain the match.
Matching techniques considered include partial matching, cross-attribute matching, spelling correction, thesaurus, and stemming matching. |
RELRANK_FREQ | Provides result scoring based on the frequency (number of occurrences) of the user's query terms in the result text. |
RELRANK_WFREQ | Scores results based on the frequency of user query terms in the result, while weighing the individual query term frequencies for each result by the information content (overall frequency in the complete data set) of each query term. |
RELRANK_NTERMS | Assigns a score to each result record based on the number of query terms that the result record matches. |
RELRANK_PROXIMITY | Ranks how close the query terms are to each other in a document by counting the number of intervening words. |
RELRANK_FIRST | Ranks documents by how close the query terms are to the beginning of the document. |
RELRANK_NUMFIELDS | Ranks results based on the number of fields in the associated search interface in which a match occurs. |
RELRANK_MODULE | Used to refer to other RELRANK elements and compose them into cohesive strategies. |
This example presents a ranking strategy called Product_Search_Rank, which itself is composed of multiple strategies.
<RELRANK_STRATEGY NAME="Product_Search_Rank"> <RELRANK_MODULE NAME="IsAvailable"/> <RELRANK_FIELD/> <RELRANK_PHRASE/> <RELRANK_MODULE NAME="BestPrice"/> </RELRANK_STRATEGY>