MediaWiki  master
NullIndexField Class Reference

Null index field - means search engine does not implement this field. More...

Inheritance diagram for NullIndexField:
Collaboration diagram for NullIndexField:

Public Member Functions

 checkFlag ( $flag)
 Check if flag is set. More...
 
 getEngineHints (SearchEngine $engine)
 
 getMapping (SearchEngine $engine)
 Get mapping for specific search engine. More...
 
 merge (SearchIndexField $that)
 Merge two field definitions if possible. More...
 
 setFlag ( $flag, $unset=false)
 Set global flag for this field. More...
 

Additional Inherited Members

- Public Attributes inherited from SearchIndexField
const FLAG_CASEFOLD = 1
 Generic field flags. More...
 
const FLAG_NO_HIGHLIGHT = 4
 This field does not need highlight handling. More...
 
const FLAG_NO_INDEX = 8
 Do not index this field, just store it. More...
 
const FLAG_SCORING = 2
 This field contains secondary information, which is already present in other fields, but can be used for scoring. More...
 
const INDEX_TYPE_BOOL = 'bool'
 
const INDEX_TYPE_DATETIME = 'datetime'
 
const INDEX_TYPE_INTEGER = 'integer'
 
const INDEX_TYPE_KEYWORD = 'keyword'
 KEYWORD fields are indexed without any processing, so are appropriate for e.g. More...
 
const INDEX_TYPE_NESTED = 'nested'
 
const INDEX_TYPE_NUMBER = 'number'
 
const INDEX_TYPE_SHORT_TEXT = 'short_text'
 SHORT_TEXT is meant to be used with short text made of mostly ascii technical information. More...
 
const INDEX_TYPE_TEXT = 'text'
 TEXT fields are suitable for natural language and may be subject to analysis such as stemming. More...
 

Detailed Description

Null index field - means search engine does not implement this field.

Definition at line 6 of file NullIndexField.php.

Member Function Documentation

◆ checkFlag()

NullIndexField::checkFlag (   $flag)

Check if flag is set.

Parameters
int$flag
Returns
int 0 if unset, !=0 if set

Implements SearchIndexField.

Definition at line 33 of file NullIndexField.php.

◆ getEngineHints()

NullIndexField::getEngineHints ( SearchEngine  $engine)

Implements SearchIndexField.

Definition at line 50 of file NullIndexField.php.

◆ getMapping()

NullIndexField::getMapping ( SearchEngine  $engine)

Get mapping for specific search engine.

Parameters
SearchEngine$engine
Returns
array|null Null means this field does not map to anything

Implements SearchIndexField.

Definition at line 13 of file NullIndexField.php.

References null.

◆ merge()

NullIndexField::merge ( SearchIndexField  $that)

Merge two field definitions if possible.

Parameters
SearchIndexField$that
Returns
SearchIndexField|false New definition or false if not mergeable.

Implements SearchIndexField.

Definition at line 43 of file NullIndexField.php.

◆ setFlag()

NullIndexField::setFlag (   $flag,
  $unset = false 
)

Set global flag for this field.

Parameters
int$flagBit flag to set/unset
bool$unsetTrue if flag should be unset, false by default
Returns
$this

Implements SearchIndexField.

Definition at line 24 of file NullIndexField.php.


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