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

Public Member Functions

 __construct ( $fieldName, $highlighterType, $target, $priority=self::DEFAULT_TARGET_PRIORITY)
 
 addOption ( $option, $value)
 
 addMatchedField ( $field)
 
 setOrder ( $order)
 
 setNumberOfFragments ( $numberOfFragments)
 
 setFragmenter ( $fragmenter)
 
 setFragmentSize ( $fragmentSize)
 
 setNoMatchSize ( $noMatchSize)
 
 setHighlightQuery (AbstractQuery $highlightQuery)
 
 getHighlightQuery ()
 
 merge (HighlightedField $other)
 @inheritDoc
 
 setOptions (array $options)
 
 getOptions ()
 
 getNumberOfFragments ()
 
 getHighlighterType ()
 
 getFragmenter ()
 
 getFragmentSize ()
 
 getNoMatchSize ()
 
 getMatchedFields ()
 
 getOrder ()
 
 toArray ()
 
 skipIfLastMatched ()
 Skip this field if the previous matched Optimization available only on the experimental highlighter.
 
- Public Member Functions inherited from CirrusSearch\Search\Fetch\HighlightedField
 getFieldName ()
 
 getTarget ()
 
 getPriority ()
 
 getType ()
 

Static Public Member Functions

static getFactories ()
 

Public Attributes

const TYPE = 'highlighting'
 
const FVH_HL_TYPE = 'fvh'
 
- Public Attributes inherited from CirrusSearch\Search\Fetch\HighlightedField
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)
 

Protected Member Functions

 matchPlainFields ()
 Helper function to populate the matchedFields array with the additional .plain field.
 

Static Protected Member Functions

static entireValue ()
 
static redirectAndHeadings ()
 
static text ()
 

Protected Attributes

 $options = []
 

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from CirrusSearch\Search\Fetch\HighlightedField.

Member Function Documentation

◆ addMatchedField()

CirrusSearch\Search\Fetch\BaseHighlightedField::addMatchedField ( $field)
Parameters
string$field
Returns
self

◆ addOption()

CirrusSearch\Search\Fetch\BaseHighlightedField::addOption ( $option,
$value )
Parameters
string$option
mixed$value(json serialization value)
Returns
self

◆ entireValue()

static CirrusSearch\Search\Fetch\BaseHighlightedField::entireValue ( )
staticprotected

◆ getFactories()

static CirrusSearch\Search\Fetch\BaseHighlightedField::getFactories ( )
static

◆ getFragmenter()

CirrusSearch\Search\Fetch\BaseHighlightedField::getFragmenter ( )
Returns
string|null

◆ getFragmentSize()

CirrusSearch\Search\Fetch\BaseHighlightedField::getFragmentSize ( )
Returns
int|null

◆ getHighlighterType()

CirrusSearch\Search\Fetch\BaseHighlightedField::getHighlighterType ( )
Returns
string

◆ getHighlightQuery()

CirrusSearch\Search\Fetch\BaseHighlightedField::getHighlightQuery ( )
Returns
AbstractQuery|null

◆ getMatchedFields()

CirrusSearch\Search\Fetch\BaseHighlightedField::getMatchedFields ( )
Returns
string[]

◆ getNoMatchSize()

CirrusSearch\Search\Fetch\BaseHighlightedField::getNoMatchSize ( )
Returns
int|null

◆ getNumberOfFragments()

CirrusSearch\Search\Fetch\BaseHighlightedField::getNumberOfFragments ( )
Returns
int|null

◆ getOptions()

CirrusSearch\Search\Fetch\BaseHighlightedField::getOptions ( )
Returns
array

◆ getOrder()

CirrusSearch\Search\Fetch\BaseHighlightedField::getOrder ( )
Returns
string|null

◆ matchPlainFields()

CirrusSearch\Search\Fetch\BaseHighlightedField::matchPlainFields ( )
protected

Helper function to populate the matchedFields array with the additional .plain field.

This only works if the getFieldName() denotes the actual elasticsearch field to highlight and is not already a plain field.

◆ merge()

CirrusSearch\Search\Fetch\BaseHighlightedField::merge ( HighlightedField $other)

◆ redirectAndHeadings()

static CirrusSearch\Search\Fetch\BaseHighlightedField::redirectAndHeadings ( )
staticprotected

◆ setFragmenter()

CirrusSearch\Search\Fetch\BaseHighlightedField::setFragmenter ( $fragmenter)
Parameters
string | null$fragmenter
Returns
self

◆ setFragmentSize()

CirrusSearch\Search\Fetch\BaseHighlightedField::setFragmentSize ( $fragmentSize)
Parameters
int | null$fragmentSize
Returns
self

◆ setHighlightQuery()

CirrusSearch\Search\Fetch\BaseHighlightedField::setHighlightQuery ( AbstractQuery $highlightQuery)
Parameters
AbstractQuery$highlightQuery
Returns
self

◆ setNoMatchSize()

CirrusSearch\Search\Fetch\BaseHighlightedField::setNoMatchSize ( $noMatchSize)
Parameters
int | null$noMatchSize
Returns
self

◆ setNumberOfFragments()

CirrusSearch\Search\Fetch\BaseHighlightedField::setNumberOfFragments ( $numberOfFragments)
Parameters
int | null$numberOfFragments
Returns
self

◆ setOrder()

CirrusSearch\Search\Fetch\BaseHighlightedField::setOrder ( $order)
Parameters
string$order
Returns
self

◆ skipIfLastMatched()

CirrusSearch\Search\Fetch\BaseHighlightedField::skipIfLastMatched ( )

Skip this field if the previous matched Optimization available only on the experimental highlighter.

Returns
self

Reimplemented in CirrusSearch\Search\Fetch\ExperimentalHighlightedFieldBuilder.

◆ text()

static CirrusSearch\Search\Fetch\BaseHighlightedField::text ( )
staticprotected

◆ toArray()

CirrusSearch\Search\Fetch\BaseHighlightedField::toArray ( )
Returns
array

Reimplemented from CirrusSearch\Search\Fetch\HighlightedField.


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