CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Profile\SearchProfileServiceFactory Class Reference

Default factory to build and prepare search profiles. More...

Public Member Functions

 __construct (InterwikiResolver $resolver, SearchConfig $hostWikiConfig, BagOStuff $localServerCache, CirrusSearchHookRunner $cirrusSearchHookRunner, UserOptionsLookup $userOptionsLookup, ExtensionRegistry $extensionRegistry)
 
 loadService (SearchConfig $config, ?WebRequest $request=null, ?UserIdentity $user=null, $forceHook=false)
 

Public Attributes

const SERVICE_NAME = self::class
 Name of the service declared in MediaWikiServices.
 

Detailed Description

Default factory to build and prepare search profiles.

The factory will load these defaults:

  • COMPLETION in CONTEXT_DEFAULT
    • default: fuzzy
    • config override: CirrusSearchCompletionSettings
    • user pref override: cirrussearch-pref-completion-profile
  • CROSS_PROJECT_BLOCK_SCORER in CONTEXT_DEFAULT
    • default: static
    • config override: CirrusSearchCrossProjectOrder
  • FT_QUERY_BUILDER in CONTEXT_DEFAULT
    • default: default
    • config override: CirrusSearchFullTextQueryBuilderProfile
    • uri param override: cirrusFTQBProfile
  • PHRASE_SUGGESTER in CONTEXT_DEFAULT
    • default: no defaults (selected by fallback methods profiles)
  • RESCORE in CONTEXT_DEFAULT and CONTEXT_PREFIXSEARCH
    • default (CONTEXT_DEFAULT & CONTEXT_PREFIXSEARCH): classic
    • config override (CONTEXT_DEFAULT): CirrusSearchRescoreProfile
    • config override (CONTEXT_PREFIXSEARCH): CirrusSearchPrefixSearchRescoreProfile
    • uri param override (CONTEXT_PREFIXSEARCH & CONTEXT_PREFIXSEARCH): cirrusRescoreProfile
  • SANEITIZER
    • default: no defaults (automatically detected based on wiki size)
  • SIMILARITY in CONTEXT_DEFAULT
    • default: default
    • config override: wgCirrusSearchSimilarityProfile
  • FALLBACK in CONTEXT_DEFAULT
    • default: none
    • config override: wgCirrusSearchFallbackProfile

NOTE: extensions may load their own repositories and overriders.

Member Function Documentation

◆ loadService()

CirrusSearch\Profile\SearchProfileServiceFactory::loadService ( SearchConfig $config,
?WebRequest $request = null,
?UserIdentity $user = null,
$forceHook = false )
Parameters
SearchConfig$config
WebRequest | null$request
UserIdentity | null$user
bool$forceHookforce running the hook even if using HashSearchConfig
Returns
SearchProfileService

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