CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\SearchQuery Class Reference

A search query, it contains all the necessary information to build and send a query to the backend. More...

Public Member Functions

 __construct (ParsedQuery $parsedQuery, array $initialNamespaces, CrossSearchStrategy $initialCrosswikiStrategy, array $contextualFilters, $searchEngineEntryPoint, $sort, $randomSeed, array $forcedProfiles, $offset, $limit, CirrusDebugOptions $debugOptions, SearchConfig $searchConfig, $withDYMSuggestion, $allowRewrite, array $profileContextParameters, array $extraFieldsToExtract, bool $provideAllSnippets)
 
 getDebugOptions ()
 
 getParsedQuery ()
 
 getInitialNamespaces ()
 
 getInitialCrossSearchStrategy ()
 
 getCrossSearchStrategy ()
 
 getContextualFilters ()
 
 getSearchEngineEntryPoint ()
 From which SearchEngine method this query entered CirrusSearch.
 
 getSort ()
 
 getRandomSeed ()
 
 getForcedProfiles ()
 
 getOffset ()
 
 getLimit ()
 
 getNamespaces ()
 List of namespaces required to run this query.
 
 getSearchConfig ()
 
 getForcedProfile ( $profileType)
 
 hasForcedProfile ()
 
 isWithDYMSuggestion ()
 
 isAllowRewrite ()
 
 getProfileContextParameters ()
 
 getExtraFieldsToExtract ()
 
 shouldProvideAllSnippets ()
 

Public Attributes

const SEARCH_TEXT = 'searchText'
 Identifier for the fulltext SearchEngine entry point.
 

Detailed Description

A search query, it contains all the necessary information to build and send a query to the backend.

NOTE: Immutable value class.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\SearchQuery::__construct ( ParsedQuery $parsedQuery,
array $initialNamespaces,
CrossSearchStrategy $initialCrosswikiStrategy,
array $contextualFilters,
$searchEngineEntryPoint,
$sort,
$randomSeed,
array $forcedProfiles,
$offset,
$limit,
CirrusDebugOptions $debugOptions,
SearchConfig $searchConfig,
$withDYMSuggestion,
$allowRewrite,
array $profileContextParameters,
array $extraFieldsToExtract,
bool $provideAllSnippets )
Parameters
ParsedQuery$parsedQuery
int[]$initialNamespaces
CrossSearchStrategy$initialCrosswikiStrategy
\CirrusSearch\Query\Builder\ContextualFilter[]$contextualFilters
string$searchEngineEntryPoint
string$sort
int | null$randomSeed
string[]$forcedProfiles
int$offset
int$limit
CirrusDebugOptions$debugOptions
SearchConfig$searchConfig
bool$withDYMSuggestion
bool$allowRewrite
string[]$profileContextParameters
string[]$extraFieldsToExtract
bool$provideAllSnippets
See also
SearchQueryBuilder

Member Function Documentation

◆ getContextualFilters()

CirrusSearch\Search\SearchQuery::getContextualFilters ( )
Returns
\CirrusSearch\Query\Builder\ContextualFilter[]

◆ getCrossSearchStrategy()

CirrusSearch\Search\SearchQuery::getCrossSearchStrategy ( )
Returns
CrossSearchStrategy

◆ getDebugOptions()

CirrusSearch\Search\SearchQuery::getDebugOptions ( )
Returns
CirrusDebugOptions

◆ getExtraFieldsToExtract()

CirrusSearch\Search\SearchQuery::getExtraFieldsToExtract ( )
Returns
string[]
See also
\CirrusSearch\Search\FullTextResultsType

◆ getForcedProfile()

CirrusSearch\Search\SearchQuery::getForcedProfile ( $profileType)
Parameters
string$profileType
See also
\CirrusSearch\Profile\SearchProfileService
Returns
string|null name of the profile or null if nothing forced for this type

◆ getForcedProfiles()

CirrusSearch\Search\SearchQuery::getForcedProfiles ( )
Returns
string[]

◆ getInitialCrossSearchStrategy()

CirrusSearch\Search\SearchQuery::getInitialCrossSearchStrategy ( )
Returns
CrossSearchStrategy

◆ getInitialNamespaces()

CirrusSearch\Search\SearchQuery::getInitialNamespaces ( )
Returns
int[]

◆ getLimit()

CirrusSearch\Search\SearchQuery::getLimit ( )
Returns
int

◆ getNamespaces()

CirrusSearch\Search\SearchQuery::getNamespaces ( )

List of namespaces required to run this query.

Returns
int[] list of namespaces, empty array means that all namespaces are required.

◆ getOffset()

CirrusSearch\Search\SearchQuery::getOffset ( )
Returns
int

◆ getParsedQuery()

CirrusSearch\Search\SearchQuery::getParsedQuery ( )
Returns
ParsedQuery

◆ getProfileContextParameters()

CirrusSearch\Search\SearchQuery::getProfileContextParameters ( )
Returns
string[]
See also
\CirrusSearch\Profile\ContextualProfileOverride

◆ getRandomSeed()

CirrusSearch\Search\SearchQuery::getRandomSeed ( )
Returns
int|null

◆ getSearchConfig()

CirrusSearch\Search\SearchQuery::getSearchConfig ( )
Returns
SearchConfig

◆ getSearchEngineEntryPoint()

CirrusSearch\Search\SearchQuery::getSearchEngineEntryPoint ( )

From which SearchEngine method this query entered CirrusSearch.

Returns
string

◆ getSort()

CirrusSearch\Search\SearchQuery::getSort ( )
Returns
string

◆ hasForcedProfile()

CirrusSearch\Search\SearchQuery::hasForcedProfile ( )
Returns
bool

◆ isAllowRewrite()

CirrusSearch\Search\SearchQuery::isAllowRewrite ( )
Returns
bool

◆ isWithDYMSuggestion()

CirrusSearch\Search\SearchQuery::isWithDYMSuggestion ( )
Returns
bool

◆ shouldProvideAllSnippets()

CirrusSearch\Search\SearchQuery::shouldProvideAllSnippets ( )
Returns
bool

Member Data Documentation

◆ SEARCH_TEXT

const CirrusSearch\Search\SearchQuery::SEARCH_TEXT = 'searchText'

Identifier for the fulltext SearchEngine entry point.

See also
\SearchEngine::searchText()

The documentation for this class was generated from the following file: