36 const SECONDARY_RESULTS = 0;
41 const INLINE_RESULTS = 1;
202 return $this->containedSyntax;
210 if ( is_null( $this->results ) ) {
214 return $this->results;
217 while ( ( $result = $this->
next() ) !=
false ) {
222 return $this->results;
230 if ( is_null( $this->titles ) ) {
235 $this->titles = array_map(
237 return $result->getTitle();
251 foreach ( $data as $id => $resultData ) {
252 $this->extraData[$id][
$name] = $resultData;
262 $id = $result->getTitle()->getArticleID();
263 if ( !$id || !isset( $this->extraData[$id] ) ) {
266 $result->setExtensionData( $this->extraData[$id] );
267 return $this->extraData[$id];
hasInterwikiResults( $type=self::SECONDARY_RESULTS)
Check if there are results on other wikis.
setAugmentedData( $name, $data)
Sets augmented data for result set.
getTotalHits()
Some search modes return a total hit count for the query in the entire article database.
augmentResult(SearchResult $result)
Returns extra data for specific result and store it in SearchResult object.
array[] $extraData
Set of result's extra data, indexed per result id and then per data item name.
getInterwikiResults( $type=self::SECONDARY_RESULTS)
Return a result set of hits on other (multiple) wikis associated with this one.
rewind()
Rewind result set back to beginning.
searchContainedSyntax()
Did the search contain search syntax? If so, Special:Search won't offer the user a link to a create a...
free()
Frees the result set, if applicable.
__construct( $containedSyntax=false)
hasRewrittenQuery()
Some search modes will run an alternative query that it thinks gives a better result than the provide...
Title[] $titles
Cache of titles.
getQueryAfterRewriteSnippet()
extractResults()
Extract all the results in the result set as array.
hasSuggestion()
Some search modes return a suggested alternate term if there are no exact hits.
$containedSyntax
Types of interwiki results.
next()
Fetches next search result, or false.
extractTitles()
Extract all the titles in the result set.
termMatches()
Fetch an array of regular expression fragments for matching the search terms as parsed by this engine...
SearchResult[] $results
Cache of results - serialization of the result iterator as an array.
Represents a title within MediaWiki.
namespace being checked & $result
Allows to change the fields on the form that will be generated $name
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles