analyzer.php
Table of Contents
Functions
- analyzer() : string
- Set the Analyzer for a search expression.
Functions
analyzer()
Set the Analyzer for a search expression.
analyzer(string $expr, string $analyzer) : string
Wraps the ArangoDB AQL function ANALYZER(expr, analyzer), which sets the
Analyzer used to evaluate the wrapped search expression and all the
nested functions that accept an Analyzer argument (so it does not have to be
repeated). A nested function passing its own Analyzer takes precedence.
Only applicable to queries against arangosearch Views — with search-alias
Views and inverted indexes the Analyzer is inferred from the index definition.
The TOKENS() function is an exception: it always requires its own Analyzer
argument, even when wrapped, because it is a regular string function.
Example AQL usage:
ANALYZER(PHRASE(doc.text, "foo") OR PHRASE(doc.text, "bar"), "text_en")
Parameters
- $expr : string
-
Any valid search expression (kept raw).
- $analyzer : string
-
Name of the Analyzer (emitted as a quoted string literal).
Tags
Return values
string —The formatted AQL expression.