CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\BuildDocument\Completion\ExtraSuggestionsBuilder Interface Reference

Extra builder for the completion suggester index. More...

+ Inheritance diagram for CirrusSearch\BuildDocument\Completion\ExtraSuggestionsBuilder:

Public Member Functions

 build (array $inputDoc, $suggestType, $score, \Elastica\Document $suggestDoc, $targetNamespace)
 Builds extra suggestions.
 
 getRequiredFields ()
 The fields needed by this extra builder.
 

Detailed Description

Extra builder for the completion suggester index.

Useful to add extra suggestions that are not part of the default strategy.

Member Function Documentation

◆ build()

CirrusSearch\BuildDocument\Completion\ExtraSuggestionsBuilder::build ( array $inputDoc,
$suggestType,
$score,
\Elastica\Document $suggestDoc,
$targetNamespace )

Builds extra suggestions.

This method can be called twice per cirrus document.

  • first time with title suggestions
  • second time with redirect suggestions
Parameters
mixed[]$inputDoc
string$suggestType(title or redirect)
int$score
\Elastica\Document$suggestDocsuggestion type (title or redirect)
int$targetNamespace

Implemented in CirrusSearch\BuildDocument\Completion\DefaultSortSuggestionsBuilder, and CirrusSearch\BuildDocument\Completion\NaiveSubphrasesSuggestionsBuilder.

◆ getRequiredFields()

CirrusSearch\BuildDocument\Completion\ExtraSuggestionsBuilder::getRequiredFields ( )

The fields needed by this extra builder.

Returns
string[] the list of fields

Implemented in CirrusSearch\BuildDocument\Completion\DefaultSortSuggestionsBuilder, and CirrusSearch\BuildDocument\Completion\NaiveSubphrasesSuggestionsBuilder.


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