Parsed query.
More...
|
const | CLEANUP_GERSHAYIM_QUIRKS = 'gershayim_quirks' |
| markup to indicate that the query was cleaned up detecting a double quote used as a gershayim see T66350
|
|
const | CLEANUP_QMARK_STRIPPING = 'stripped_qmark' |
| markup to indicate that the had some question marks stripped
|
|
const | TILDE_HEADER = 'tilde_header' |
| markup to indicate that we removed a '~' at the beginning of the query
|
|
◆ __construct()
- Parameters
-
ParsedNode | $root | |
string | $query | cleaned up query string |
string | $rawQuery | original query as received by the search engine |
bool[] | $queryCleanups | indexed by cleanup type (non-empty when $query !== $rawQuery) |
?NamespaceHeaderNode | $namespaceHeader | namespace found as a "header" of the query is a int when a namespace id is provided, string with 'all' or null if none specified |
array | string | $requiredNamespaces | |
ParseWarning[] | $parseWarnings | list of warnings detected during parsing |
ParsedQueryClassifiersRepository | $repository | |
◆ getActualNamespaces()
CirrusSearch\Parser\AST\ParsedQuery::getActualNamespaces |
( |
?array | $namespaces = null, |
|
|
?array | $additionalRequiredNamespaces = null ) |
Determine the actual namespaces required for this query to run assuming that $namespaces is the list of namespaces initially requested usually set \SearchEngine::setNamespaces()
.
- Parameters
-
int[] | null | $namespaces | initial namespaces |
int[] | null | $additionalRequiredNamespaces | additional namespaces required (by ContextualFilters) |
- Returns
- int[] the list of namespaces that have to be queried, empty array means all namespaces
- See also
- \SearchEngine::setNamespaces()
-
self::getRequiredNamespaces()
-
self::getNamespaceHeader()
-
\CirrusSearch\Query\Builder\ContextualFilter::requiredNamespaces()
◆ getCrossSearchStrategy()
CirrusSearch\Parser\AST\ParsedQuery::getCrossSearchStrategy |
( |
| ) |
|
Get the cross search strategy supported by this query.
- Returns
- CrossSearchStrategy
- Parameters
-
◆ getFeaturesUsed()
CirrusSearch\Parser\AST\ParsedQuery::getFeaturesUsed |
( |
| ) |
|
Get the list of keyword features used by this query.
- See also
- \CirrusSearch\Query\KeywordFeature::getFeatureName()
- Returns
- string[]
- Parameters
-
◆ getNamespaceHeader()
CirrusSearch\Parser\AST\ParsedQuery::getNamespaceHeader |
( |
| ) |
|
Get the node of the namespace header identified in the prefix of the query if specified.
It can be null in all other cases
- Returns
- NamespaceHeaderNode|null
◆ getParseWarnings()
CirrusSearch\Parser\AST\ParsedQuery::getParseWarnings |
( |
| ) |
|
List of warnings detected at parse time.
- Returns
- ParseWarning[]
◆ getQuery()
CirrusSearch\Parser\AST\ParsedQuery::getQuery |
( |
| ) |
|
The query being parsed Some cleanups may have been made to the raw query NOTE: the query may include the namespace header.
- Returns
- string
◆ getQueryWithoutNsHeader()
CirrusSearch\Parser\AST\ParsedQuery::getQueryWithoutNsHeader |
( |
| ) |
|
The query string without the namespace header.
- Returns
- string
◆ getRawQuery()
CirrusSearch\Parser\AST\ParsedQuery::getRawQuery |
( |
| ) |
|
The raw query as received by the search engine.
- Returns
- string
◆ getRequiredNamespaces()
CirrusSearch\Parser\AST\ParsedQuery::getRequiredNamespaces |
( |
| ) |
|
- Returns
- array|string array of additional namespaces or 'all' if all namespaces required
◆ getRoot()
CirrusSearch\Parser\AST\ParsedQuery::getRoot |
( |
| ) |
|
◆ hasCleanup()
CirrusSearch\Parser\AST\ParsedQuery::hasCleanup |
( |
| $cleanup | ) |
|
Check if the query was cleanup with this type.
- See also
- ParsedQuery::CLEANUP_QMARK_STRIPPING
-
ParsedQuery::CLEANUP_GERSHAYIM_QUIRKS
- Parameters
-
- Returns
- bool
◆ isQueryOfClass()
CirrusSearch\Parser\AST\ParsedQuery::isQueryOfClass |
( |
| $class | ) |
|
- Parameters
-
- Returns
- bool
- Exceptions
-
CirrusSearch\Parser\ParsedQueryClassifierException if the class is unknown
◆ preloadQueryClasses()
CirrusSearch\Parser\AST\ParsedQuery::preloadQueryClasses |
( |
| ) |
|
Preload all known query classes and classify this query.
- Exceptions
-
CirrusSearch\Parser\ParsedQueryClassifierException
◆ toArray()
CirrusSearch\Parser\AST\ParsedQuery::toArray |
( |
| ) |
|
◆ CLEANUP_QMARK_STRIPPING
const CirrusSearch\Parser\AST\ParsedQuery::CLEANUP_QMARK_STRIPPING = 'stripped_qmark' |
markup to indicate that the had some question marks stripped
- See also
- \CirrusSearch\Util::stripQuestionMarks
The documentation for this class was generated from the following file:
- includes/Parser/AST/ParsedQuery.php