The URL query parameters that define the search and navigation
objects passed into the MDEX Engine Navigation API are configured on the
UrlNavigationStateBuilder
object. By default, the
Assembler is configured to use the following parameters:
URL Parameter |
Feature |
---|---|
|
Navigation filter |
|
Record search terms |
|
Record search key |
|
Record search match mode |
|
Range filter |
|
Geocode filter |
|
Record filter |
|
EQL filter |
|
Featured Records selector |
|
Record |
|
Aggregate record |
|
Auto-phrasing |
|
Language ID |
Note
To execute an aggregate record query using the
A
parameter, you must specify an aggregated record
rollup key. Oracle recommends setting this key in your global application
configuration; for example, in the Discover Electronics reference application,
it is configured in the Assembler context file.
These parameters are described in detail in the following sections. The examples provided are for the Discover Electronics reference application.
The
N
parameter sets the navigation field for a query.
Parameter |
|
Name |
Navigation |
Type and format |
|
Object |
|
Description |
A unique combination of dimension value IDs. A value of zero indicates the root navigation object. |
Dependencies |
(none) |
Example 7. Examples
The following example is for an all-inclusive search, as it does not refine the results by any dimension value:
N=0
The following example returns products with an average review rating of 5:
N=100021
Note
The Discover Electronics reference application has Search Engine
Optimization enabled by default, which encodes the above URL value to
N-256d
. For more information about creating optimized
URLs, see
Building optimized URLsand
the
Sitemap Generator Developer's Guide.
The
Ntt
parameter sets the actual terms of a record search for
a navigation query.
Parameter |
|
Name |
Record Search Terms |
Type and format |
|
Object |
|
Description |
Sets the terms of the record search for a navigation query. Each term is delimited by a plus sign (+). Each set of terms is delimited by a pipe (|).
NoteThere is no explicit text search descriptor API object, so your application logic must extract search terms from the query if you wish to display them in Breadcrumbs or a similar search tracker.
|
Dependencies |
|
Example 8. Examples
The following example returns records with a match for the term "zoom":
N=0&Ntt=zoom
The following example returns records with a match for the terms
"cameras" and "silver" in the
product.description
record property. Note that the
combined terms count as a single "search term" for the purposes of query
syntax:
N=0&Ntk=product.description&Ntt=cameras+silver
Note
The Discover Electronics reference application is configured to
use a default search key of "All" in the Spring context definition file for the
Assembler, so it will accept a Record Search terms URL parameter
(Ntt
) without an accompanying Record Search key
(Ntk
) parameter.
The
Ntk
parameter sets which dimension, property, or search
interface is evaluated for a record search query.
Parameter |
|
Name |
Record Search Key |
Type and format |
|
Object |
|
Description |
Sets the keys of the record search for the navigation query.
Multiple keys are delimited by a vertical pipe ( |
Dependencies |
|
Example 9. Examples
The following example returns records with a match for the terms
"cameras" and "silver" in the
product.description
record property. Note that the
combined terms count as a single "search term" for the purposes of query
syntax:
N=0&Ntk=product.description&Ntt=cameras+silver
The following example returns records with a match for the term
"cameras" in the
product.description
record property OR a match for the
term "silver" in the
camera.color
record property. Note that these are
evaluated as separate terms, and that each search term is associated with the
search key that appears in the same location in the sequence:
N=0&Ntk=product.description|camera.color&Ntt=cameras|silver
Note
The Discover Electronics reference application is configured to
use a default search key of "All" in the Spring context definition file for the
Assembler, so it will accept a Record Search terms URL parameter
(Ntt
) without an accompanying Record Search key
(Ntk
) parameter.
The
Ntx
parameter sets the options for record search in the
navigation query.
Parameter |
|
Name |
Record Search Mode |
Type and format |
|
Object |
|
Description |
Sets the options for record search in the navigation query.
Multiple values are separated with a vertical pipe ( |
Dependencies |
|
Example 10. Examples
The following example returns records with a match for the terms
"cameras" and "silver" in the
product.description
record property. It overrides the
default match mode with "MatchAllAny":
N=0&Ntk=product.description&Ntt=cameras+silver&Ntx=matchallany
The
Nf
parameter sets the range filters for the navigation
query.
Parameter |
|
Name |
Range Filter |
Type and format |
|
Object |
|
Description |
Sets the range filters for the navigation query on properties or on dimensions. Multiple range filters are separated with a double vertical pipe (||) delimiter. Accepts property and dimension values of Numeric type (Integer, Floating point, DateTime). For values of type Floating point, you can specify values using both decimal (0.00...68), and scientific notation (6.8e-10). |
Dependencies |
|
Example 11. Examples
The following example returns products with a price below $25:
N=0?Nf=product.price|LT+25
The following example returns products with a price between $50 and $100 (inclusive):
N=0?Nf=product.price|BTWN+50+100
It is equivalent to specifying a "greater than or equal to" filter in combination with a "less than or equal to" filter:
N=0?Nf=product.price|GTEQ+50||product.price|LTEQ+100
The
Nfg
parameter sets a geocode filter for the navigation
query, with radius in kilometers.
Parameter |
|
Name |
Geocode Filter |
Type and format |
|
Object |
|
Description |
Filters records by evaluating the geocode
location contained in the
Positive
|
Dependencies |
|
The
Nr
parameter sets a record filter on a navigation query.
Parameter |
|
Name |
Record Filter |
Type and format |
|
Object |
|
Description |
This parameter can be used to specify a record filter expression that restricts the results of a navigation query. Record filter syntax is described in the MDEX Engine Development Guide. |
Dependencies |
|
Example 12. Examples
A general syntax example is given below:
N=0&Nr=AND(132831,propertyA:valueX,OR(propertyB:valueY,propertyC:valueZ))
The following example only includes records that are tagged as products, and it excludes any products that are not in stock:
N=0&Nr=AND((common.record_type:product),NOT(product.inventory.count:0))
The
Nrs
parameter sets an EQL record filter on a navigation
query. Using EQL enables you to specify multiple filters (such as a geocode
range filter, a dimension value filter, and a record search filter) as part of
the same query parameter.
Parameter |
|
Name |
Endeca Query Language Filter |
Type and format |
|
Object |
|
Description |
Sets the Endeca Query Language expression for the navigation query. The expression acts as a filter to restrict the results of the query. Endeca Query Language syntax is documented in the MDEX Engine Development Guide.
NoteThe
|
Dependencies |
|
Example 13. Examples
Consider the sample Geocode Filter discussed earlier, which matches records at stores within 10 km of the Statue of Liberty in NYC, NY:
N=0&Nfg=store.geocode|40.6893|-74.0446|10
Combining the above with a record filter that excludes out-of-stock records results in the following:
N=0&Nfg=store.geocode|40.6893|-74.0446|10&Nr=NOT(product.inventory.count:0))
The above functionality can be duplicated with a single EQL query parameter by using the following expression:
N=0&Nrs=collection()/record[product.inventory.count!=0 and endeca:distance(store.geocode,endeca:geocode(40.6893,-74.0446))<10]
The
R
parameter specifies a single Endeca record to return
from the MDEX Engine.
The
Rsel
parameter restricts the search results list to a set
of records specified by record ID.
The
A
parameter specifies a single aggregated record to return
from the MDEX Engine.
Parameter |
|
Name |
Aggregated Record |
Type and format |
|
Object |
|
Description |
Query to obtain a single aggregated record from the MDEX Engine. |
Dependencies |
(none) |
Example 14. Example
The following example specifies the IXUS 85 IS camera in the Discover
Electronics data set; however, because the application serves record detail
pages using the
/detail
servlet with a record-specific path, it
has no effect:
A=1469273
The
Ntp
parameter sets whether the MDEX Engine applies
computed alternative phrasings for the current query.
Parameter |
|
Name |
Auto-Phrasing |
Type and format |
|
Object |
|
Description |
Set to 1 to enable auto-phrasing, or 0 to
disable it. If enabled, the MDEX Engine both computes and applies alternate
query phrasings. If disabled, the MDEX Engine does not apply alternate query
phrasings, but may compute them if
|
Dependencies |
|
The
Ntl
parameter sets the language ID to pass in to the MDEX
Engine.
Parameter |
|
Name |
Language ID |
Type and format |
|
Object |
|
Description |
Specifies a language to cause the MDEX Engine to perform language-specific operations, such as invoking the correct stemming and phrasing dictionaries. For a list of supported languages, see the MDEX Engine Development Guide. |
Dependencies |
|