The
endeca:matches()
function allows a user to perform a
keyword search against specific properties or dimension values assigned to
records. (Record search queries are also called text search queries.)
The resulting records that have matching
properties or dimension values are returned, along with any valid refinement
dimension values. The search operation returns results that contain text
matching all user search terms (that is, the search is conjunctive by default).
To perform a less restrictive search, use the
matchMode
argument to specify a match mode other than
MatchAll
mode. Wildcard terms (using the * character)
can be specified if the search interface or property is configured for
wildcards in Developer Studio.
Note the following about record search queries:
The text search is case insensitive, including phrase search.
Properties must be enabled for record search (in Developer Studio). Records with properties that are not enabled for record search will not be returned in this type of query.
For wildcard terms, properties must be enabled for wildcard search.
The syntax for a record search query is:
collection()/record[endeca:matches(., "searchKey", "searchTerm", "matchMode", "languageId", autoPhrase)]
The meanings of the arguments are as follows:
Argument |
Meaning |
---|---|
|
Required. The period is currently the only valid option. The period is the XPath context item, which is the node currently being considered (that is, the node to apply the function to). In effect, the context item is the record to search. |
|
Required. The name of an Oracle Commerce property or search interface which will be evaluated for the search. The name must be specified within a set of double quotes. Property names must use the NCName format and must be enabled for record search. Search interface names do not have to use the NCName format. |
|
Required. The term to search for (which may contain multiple
words or phrases). Specify the search term within a pair of double quotes.
Phrase searches within
For example, in "Melville ""Moby Dick"" hardcover", the phrase
"Moby Dick" is enclosed in two pairs of double quotes: these yield a single
escaped pair which indicates a phrase search for these words. In another
example, """Tiny Tim""", the outermost pair of double quotes delimits the full
NoteTo enable EQL parsing, use straight double-quote characters for double quotes (rather than typographer’s double quotes, which the EQL parser does not accept).
|
|
Optional. A match mode (also called a search mode) that specifies how restrictive the match should be. The match mode must be specified within a set of double quotes. The valid match modes are
NoteMatchBoolean is not supported, because EQL has its own
powerful set of query composition features such as the
|
|
Optional. A per-query language ID, such as “fr” for French. The ID must be specified within a set of double quotes. For a list of valid language IDs, see the topic “Using language identifiers." The default language ID is the default for the MDEX Engine. |
|
Optional. A TrueFunction or FalseFunction that sets the option
for automatic-phrasing query re-write. The default is
|