CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Dispatch\SearchQueryRoute Interface Reference

For a given search engine entry point a SearchQueryRoute evaluates a particular SearchQuery and assign it a score. More...

+ Inheritance diagram for CirrusSearch\Dispatch\SearchQueryRoute:

Public Member Functions

 score (SearchQuery $query)
 Compute a score for this particular $query.
 
 getSearchEngineEntryPoint ()
 The entry point used in the search engine:
 
 getProfileContext ()
 The SearchProfile context to use when this route is chosen.
 

Detailed Description

For a given search engine entry point a SearchQueryRoute evaluates a particular SearchQuery and assign it a score.

The SearchQueryDispatchService evaluates these scores and chose the best one in order to assign the profile context using the one provided by the route itself. SearchQueryRoutes are evaluated just after the SearchQuery is constructed and before ES query building components are chosen.

See also
\CirrusSearch\Profile\SearchProfileService

Member Function Documentation

◆ getProfileContext()

CirrusSearch\Dispatch\SearchQueryRoute::getProfileContext ( )

The SearchProfile context to use when this route is chosen.

Returns
string

Implemented in CirrusSearch\Dispatch\BasicSearchQueryRoute, and CirrusSearch\Dispatch\CirrusDefaultSearchQueryRoute.

◆ getSearchEngineEntryPoint()

CirrusSearch\Dispatch\SearchQueryRoute::getSearchEngineEntryPoint ( )

The entry point used in the search engine:

  • searchText
  • nearMatch
  • completionSearch
Returns
string

Implemented in CirrusSearch\Dispatch\BasicSearchQueryRoute, and CirrusSearch\Dispatch\CirrusDefaultSearchQueryRoute.

◆ score()

CirrusSearch\Dispatch\SearchQueryRoute::score ( SearchQuery $query)

Compute a score for this particular $query.

Special values:

  • 0.0: this route must be avoided
  • 1.0: this route must supersede any others, the system fails if multiple routes return a score equals to 1
    Parameters
    SearchQuery$query
    Returns
    float a score between 0 and 1

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