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

Defines support strategies regarding cross wiki searches. More...

Public Member Functions

 __construct ( $crossProjectSearchSupported, $crossLanguageSearchSupported, $extraIndicesSupported)
 
 isCrossProjectSearchSupported ()
 Is cross project search supported (aka interwiki search)
 
 isCrossLanguageSearchSupported ()
 Is cross language search supported (i.e.
 
 isExtraIndicesSearchSupported ()
 (in WMF context it's most commonly used to search media files on commons from any wikis.)
 
 intersect (CrossSearchStrategy $other)
 Intersect this strategy with other.
 

Static Public Member Functions

static hostWikiOnlyStrategy ()
 Only host wiki is supported Applies to features that are probably not available on any other target wiki cirrus may access.
 
static allWikisStrategy ()
 Applies to features that must be available on any target wiki.
 

Detailed Description

Defines support strategies regarding cross wiki searches.

Cross wiki search techniques include:

  • extra indices searches (i.e. search media files on commons)
  • cross project searches
  • cross language searches (i.e. second try attempt)

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\CrossSearchStrategy::__construct ( $crossProjectSearchSupported,
$crossLanguageSearchSupported,
$extraIndicesSupported )
Parameters
bool$crossProjectSearchSupported
bool$crossLanguageSearchSupported
bool$extraIndicesSupported

Member Function Documentation

◆ allWikisStrategy()

static CirrusSearch\CrossSearchStrategy::allWikisStrategy ( )
static

Applies to features that must be available on any target wiki.

Returns
CrossSearchStrategy

◆ hostWikiOnlyStrategy()

static CirrusSearch\CrossSearchStrategy::hostWikiOnlyStrategy ( )
static

Only host wiki is supported Applies to features that are probably not available on any other target wiki cirrus may access.

Returns
CrossSearchStrategy

◆ intersect()

CirrusSearch\CrossSearchStrategy::intersect ( CrossSearchStrategy $other)

Intersect this strategy with other.

Parameters
CrossSearchStrategy$other
Returns
CrossSearchStrategy

◆ isCrossLanguageSearchSupported()

CirrusSearch\CrossSearchStrategy::isCrossLanguageSearchSupported ( )

Is cross language search supported (i.e.

second try language search)

Returns
bool

◆ isCrossProjectSearchSupported()

CirrusSearch\CrossSearchStrategy::isCrossProjectSearchSupported ( )

Is cross project search supported (aka interwiki search)

Returns
bool

◆ isExtraIndicesSearchSupported()

CirrusSearch\CrossSearchStrategy::isExtraIndicesSearchSupported ( )

(in WMF context it's most commonly used to search media files on commons from any wikis.)

See wgCirrusSearchExtraIndexes

Returns
bool

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