Specify an explicit sort key in the MDEX Engine query, set a
default sort order, or use relevance ranking (for records returned in response
to record search queries).
There are three ways of controlling the
order in which records are returned:
- Specifying an explicit sort
key in the MDEX Engine query, either via a URL parameter (Ns) or an ENEQuery
setter method (setNavActiveSortKeys())
- Specifying a default sort
order (Dgidx option).
- Using relevance ranking, for
records returned in response to record search queries only. Relevance ranking
settings can either be implicitly defined as part of the search interface, or
explicitly defined in the search query itself.
The priority of record sorting/relevance ranking is as follows:
- If none of these three
sorting methods is specified, records are returned in an arbitrary, but
consistent, order as determined by an internal ID generated by Dgidx during
indexing.
- If the MDEX Engine query
includes an explicit sort key parameter, that sort key overrides all other
sorting and relevance ranking settings.
- If a default sort key is
specified, and no other sort parameters are set, records are returned in
default sort order. Ties are broken using the arbitrary internal order
described above.
- When searching against a
search interface that incorporates a relevance ranking strategy, the relevance
ranking strategy takes priority but ties are broken using the default sort key,
if one has been specified. If there is no default sort key, ties are broken
using the internal ID order described above.
- If the MDEX Engine query
includes a relevance ranking parameter, that setting overrides any relevance
ranking strategies configured in the search interface that is being searched
against.
A search interface is a named collection of properties and dimensions,
each of which has its Enable Record Search option checked. Search interfaces
allow your end-users to search on multiple properties and/or dimensions
simultaneously. The search interface's name is used just like a normal property
or dimension when performing record searches. A record search query on a search
interface returns results that match any of the properties or dimensions in the
interface.
Note: Fully implementing this feature requires additional work outside of
Developer Studio. Please refer to the
Endeca Basic Development Guide for details.