CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Query\FullTextQueryBuilder Interface Reference

Parse a cirrus fulltext search query and build an elasticsearch query. More...

+ Inheritance diagram for CirrusSearch\Query\FullTextQueryBuilder:

Public Member Functions

 build (SearchContext $searchContext, $term)
 Build a query for supplied term.
 
 buildDegraded (SearchContext $searchContext)
 Attempt to build a degraded query from the query already built into $context.
 

Detailed Description

Parse a cirrus fulltext search query and build an elasticsearch query.

Member Function Documentation

◆ build()

CirrusSearch\Query\FullTextQueryBuilder::build ( SearchContext $searchContext,
$term )

Build a query for supplied term.

The method will setup the query and accompanying environment within the supplied context.

TODO: right now, this code does two separate things, parsing $term and building query from parsed structure. We may want to split this into separate actions, to allow other query builders to benefit from parsing stage but override building stage.

Parameters
SearchContext$searchContext
string$termterm to search

Implemented in CirrusSearch\Query\FullTextQueryStringQueryBuilder.

◆ buildDegraded()

CirrusSearch\Query\FullTextQueryBuilder::buildDegraded ( SearchContext $searchContext)

Attempt to build a degraded query from the query already built into $context.

Must be called after self::build().

Parameters
SearchContext$searchContext
Returns
bool True if a degraded query was built

Implemented in CirrusSearch\Query\FullTextQueryStringQueryBuilder.


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