BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SMW\MediaWiki\Search\Search Class Reference
Inheritance diagram for SMW\MediaWiki\Search\Search:
Collaboration diagram for SMW\MediaWiki\Search\Search:

Public Member Functions

 setFallbackSearchEngine (SearchEngine $fallbackSearch=null)
 
 getFallbackSearchEngine ()
 
 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)
 
- Public Member Functions inherited from SearchEngine
 searchText ($term)
 
 searchTitle ($term)
 
 supports ($feature)
 
 setFeatureData ($feature, $data)
 
 normalizeText ($string)
 
 transformSearchTerm ($term)
 
 getNearMatcher (Config $config)
 
 setLimitOffset ($limit, $offset=0)
 
 setNamespaces ($namespaces)
 
 setShowSuggestion ($showSuggestion)
 
 getValidSorts ()
 
 setSort ($sort)
 
 getSort ()
 
 replacePrefixes ($query)
 
 update ($id, $title, $text)
 
 updateTitle ($id, $title)
 
 delete ($id, $title)
 
 getTextFromContent (Title $t, Content $c=null)
 
 textAlreadyUpdatedForIndex ()
 
 completionSearch ($search)
 
 completionSearchWithVariants ($search)
 
 extractTitles (SearchSuggestionSet $completionResults)
 
 defaultPrefixSearch ($search)
 

Additional Inherited Members

- Static Public Member Functions inherited from SearchEngine
static getNearMatch ($searchterm)
 
static getNearMatchResultSet ($searchterm)
 
static legalSearchChars ($type=self::CHARS_ALL)
 
static userHighlightPrefs ()
 
static getOpenSearchTemplate ()
 
static searchableNamespaces ()
 
static userNamespaces ($user)
 
static defaultNamespaces ()
 
static namespacesAsText ($namespaces)
 
static create ($type=null)
 
static getSearchTypes ()
 
- Public Attributes inherited from SearchEngine
 $prefix = ''
 
 $namespaces = [ NS_MAIN ]
 
const CHARS_ALL = 1
 
const CHARS_NO_SYNTAX = 2
 
- Protected Member Functions inherited from SearchEngine
 normalizeNamespaces ($search)
 
 completionSearchBackend ($search)
 
 processCompletionResults ($search, SearchSuggestionSet $suggestions)
 
 simplePrefixSearch ($search)
 
- Static Protected Member Functions inherited from SearchEngine
static defaultNearMatcher ()
 
- Protected Attributes inherited from SearchEngine
 $limit = 10
 
 $offset = 0
 
 $searchTerms = []
 
 $showSuggestion = true
 
 $features = []
 

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

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
SMW\MediaWiki\Search\Search::getDB ( )
Returns
DatabaseBase
SMW\MediaWiki\Search\Search::getFallbackSearchEngine ( )
Returns
SearchEngine
SMW\MediaWiki\Search\Search::getFeatureData (   $feature)
Parameters
String$feature
Returns
array|null
SMW\MediaWiki\Search\Search::getLimit ( )
Returns
int
SMW\MediaWiki\Search\Search::getOffset ( )
Returns
int
SMW\MediaWiki\Search\Search::getShowSuggestion ( )
Returns
boolean
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
SMW\MediaWiki\Search\Search::replacePrefixes (   $query)

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

Parameters
string$query
Returns
string
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
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
SMW\MediaWiki\Search\Search::setDB ( DatabaseBase  $connection)
Parameters
DatabaseBase$connection
SMW\MediaWiki\Search\Search::setFallbackSearchEngine ( SearchEngine  $fallbackSearch = null)
Parameters
null | SearchEngine$fallbackSearch
SMW\MediaWiki\Search\Search::supports (   $feature)
Parameters
string$feature
Returns
bool
SMW\MediaWiki\Search\Search::transformSearchTerm (   $term)

No Transformation needed. Returns term as is.

Parameters
$term
Returns
mixed
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
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: