CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\Fetch\HighlightedField Class Reference
+ Inheritance diagram for CirrusSearch\Search\Fetch\HighlightedField:

Public Member Functions

 __construct ( $type, $fieldName, $target, $priority=self::DEFAULT_TARGET_PRIORITY)
 
 getFieldName ()
 
 getTarget ()
 
 getPriority ()
 
 getType ()
 
 merge (HighlightedField $field)
 
 toArray ()
 

Public Attributes

const DEFAULT_TARGET_PRIORITY = 100
 Priority for properties that are doc dependent (e.g.
 
const QUERY_DEPENDENT_TARGET_PRIORITY = 200
 Priority for properties that are query dependent (highlight in content)
 
const EXPERT_SYNTAX_PRIORITY = 300
 Priority for properties that are query dependent and triggered using search keywords (intitle:foo highlight)
 
const TARGET_TITLE_SNIPPET = ArrayCirrusSearchResult::TITLE_SNIPPET
 
const TARGET_REDIRECT_SNIPPET = ArrayCirrusSearchResult::REDIRECT_SNIPPET
 
const TARGET_CATEGORY_SNIPPET = ArrayCirrusSearchResult::CATEGORY_SNIPPET
 
const TARGET_MAIN_SNIPPET = ArrayCirrusSearchResult::TEXT_SNIPPET
 
const TARGET_SECTION_SNIPPET = ArrayCirrusSearchResult::SECTION_SNIPPET
 
const COSTLY_EXPERT_SYNTAX_PRIORITY = 400
 Priority for properties are query dependent and triggered using costly search keywords (for intitle:/foo[0-9]/ intitle:bar we will prefer the highlight on the regex over the simple intitle:bar)
 

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\Fetch\HighlightedField::__construct ( $type,
$fieldName,
$target,
$priority = self::DEFAULT_TARGET_PRIORITY )
Parameters
string$type
string$fieldName
string$target
int$priority

Reimplemented in CirrusSearch\Search\Fetch\BaseHighlightedField.

Member Function Documentation

◆ getFieldName()

CirrusSearch\Search\Fetch\HighlightedField::getFieldName ( )
Returns
string

◆ getPriority()

CirrusSearch\Search\Fetch\HighlightedField::getPriority ( )
Returns
int

◆ getTarget()

CirrusSearch\Search\Fetch\HighlightedField::getTarget ( )
Returns
string

◆ getType()

CirrusSearch\Search\Fetch\HighlightedField::getType ( )
Returns
string

◆ merge()

CirrusSearch\Search\Fetch\HighlightedField::merge ( HighlightedField $field)
abstract
Parameters
HighlightedField$field
Returns
HighlightedField

Reimplemented in CirrusSearch\Search\Fetch\BaseHighlightedField, and CirrusSearch\Search\Fetch\ExperimentalHighlightedFieldBuilder.

◆ toArray()

CirrusSearch\Search\Fetch\HighlightedField::toArray ( )
abstract
Returns
array an entry in the fields section of the highlighting part of a search request body

Reimplemented in CirrusSearch\Search\Fetch\BaseHighlightedField.

Member Data Documentation

◆ DEFAULT_TARGET_PRIORITY

const CirrusSearch\Search\Fetch\HighlightedField::DEFAULT_TARGET_PRIORITY = 100

Priority for properties that are doc dependent (e.g.

doc size)


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