Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | List of all members
SMW\MediaWiki\Search\Search Class Reference
Inheritance diagram for SMW\MediaWiki\Search\Search:
Inheritance graph
[legend]
Collaboration diagram for SMW\MediaWiki\Search\Search:
Collaboration graph
[legend]

Public Member Functions

 getValidSorts ()
 
 setFallbackSearchEngine (SearchEngine $fallbackSearch=null)
 
 getFallbackSearchEngine ()
 
 getErrors ()
 
 getQueryString ()
 
 getQueryLink ()
 
 setDB (DatabaseBase $connection)
 
 getDB ()
 
 searchTitle ( $term)
 
 searchText ( $term)
 
 supports ( $feature)
 
 normalizeText ( $string)
 
 getTextFromContent (Title $t, Content $c=null)
 
 textAlreadyUpdatedForIndex ()
 
 update ( $id, $title, $text)
 
 updateTitle ( $id, $title)
 
 delete ( $id, $title)
 
 setFeatureData ( $feature, $data)
 
 getFeatureData ( $feature)
 
 replacePrefixes ( $query)
 
 transformSearchTerm ( $term)
 
 getLimit ()
 
 getOffset ()
 
 getShowSuggestion ()
 
 setLimitOffset ( $limit, $offset=0)
 
 setNamespaces ( $namespaces)
 
 setShowSuggestion ( $showSuggestion)
 

Protected Member Functions

 completionSearchBackend ( $search)
 

Detailed Description

Search engine that will try to find wiki pages by interpreting the search term as an SMW query.

If successful, the pages according to the query will be returned. If not it falls back to the default search engine.

GNU GPL v2+

Since
2.1
Author
Stephan Gambke

Member Function Documentation

◆ completionSearchBackend()

SMW\MediaWiki\Search\Search::completionSearchBackend (   $search)
protected
See also
SearchEngine::completionSearchBackend

Perform a completion search.

Parameters
string$search
Returns
SearchSuggestionSet

◆ delete()

SMW\MediaWiki\Search\Search::delete (   $id,
  $title 
)

Delete an indexed page Title should be pre-processed.

Parameters
int$idPage id that was deleted
string$titleTitle of page that was deleted

◆ getDB()

SMW\MediaWiki\Search\Search::getDB ( )
Returns

◆ getErrors()

SMW\MediaWiki\Search\Search::getErrors ( )
Since
3.0
Returns
[]

◆ getFallbackSearchEngine()

SMW\MediaWiki\Search\Search::getFallbackSearchEngine ( )
Returns
SearchEngine

◆ getFeatureData()

SMW\MediaWiki\Search\Search::getFeatureData (   $feature)
Parameters
String$feature
Returns
array|null

◆ getLimit()

SMW\MediaWiki\Search\Search::getLimit ( )
Returns
int

◆ getOffset()

SMW\MediaWiki\Search\Search::getOffset ( )
Returns
int

◆ getQueryLink()

SMW\MediaWiki\Search\Search::getQueryLink ( )
Since
3.0
Returns
string

◆ getQueryString()

SMW\MediaWiki\Search\Search::getQueryString ( )
Since
3.0
Returns
string

◆ getShowSuggestion()

SMW\MediaWiki\Search\Search::getShowSuggestion ( )
Returns
boolean

◆ getValidSorts()

SMW\MediaWiki\Search\Search::getValidSorts ( )
See also
SearchEngine::getValidSorts
Since
3.0
Returns
array

◆ normalizeText()

SMW\MediaWiki\Search\Search::normalizeText (   $string)

May performs database-specific conversions on text to be used for searching or updating search index.

Parameters
string$stringString to process
Returns
string

◆ replacePrefixes()

SMW\MediaWiki\Search\Search::replacePrefixes (   $query)

SMW queries do not have prefixes. Returns query as is.

Parameters
string$query
Returns
string

◆ searchText()

SMW\MediaWiki\Search\Search::searchText (   $term)

Perform a full text search query and return a result set. If title searches are not supported or disabled, return null.

Parameters
string$termRaw search term
Returns
SearchResultSet||null

◆ searchTitle()

SMW\MediaWiki\Search\Search::searchTitle (   $term)

Perform a title-only search query and return a result set.

This method will try to find wiki pages by interpreting the search term as an SMW query.

If successful, the pages according to the query will be returned. If not, it falls back to the default search engine.

Parameters
string$termRaw search term
Returns
SearchResultSet|null

◆ setDB()

SMW\MediaWiki\Search\Search::setDB ( DatabaseBase  $connection)
Parameters
DatabaseBase$connection

◆ setFallbackSearchEngine()

SMW\MediaWiki\Search\Search::setFallbackSearchEngine ( SearchEngine  $fallbackSearch = null)
Parameters
null | SearchEngine$fallbackSearch

◆ supports()

SMW\MediaWiki\Search\Search::supports (   $feature)
Parameters
string$feature
Returns
bool

◆ transformSearchTerm()

SMW\MediaWiki\Search\Search::transformSearchTerm (   $term)

No Transformation needed. Returns term as is.

Parameters
$term
Returns
mixed

◆ update()

SMW\MediaWiki\Search\Search::update (   $id,
  $title,
  $text 
)

Create or update the search index record for the given page. Title and text should be pre-processed.

Parameters
int$id
string$title
string$text

◆ updateTitle()

SMW\MediaWiki\Search\Search::updateTitle (   $id,
  $title 
)

Update a search index record's title only. Title should be pre-processed.

Parameters
int$id
string$title

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

About | General disclaimer | Privacy policy