|
MediaWiki
master
|
Basic infrastructure of the field definition. More...


Public Member Functions | |
| __construct ($name, $type) | |
| SearchIndexFieldDefinition constructor. More... | |
| checkFlag ($flag) | |
| Check if flag is set. More... | |
| getIndexType () | |
| Get index type. More... | |
| getName () | |
| Get field name. More... | |
| getSubfields () | |
| Get subfields. More... | |
| merge (SearchIndexField $that) | |
| Merge two field definitions if possible. More... | |
| setFlag ($flag, $unset=false) | |
| Set global flag for this field. More... | |
| setSubfields (array $subfields) | |
| Set subfields. More... | |
Public Member Functions inherited from SearchIndexField | |
| getMapping (SearchEngine $engine) | |
| Get mapping for specific search engine. More... | |
Protected Attributes | |
| int | $flags = 0 |
| Bit flags for the field. More... | |
| string | $name |
| Name of the field. More... | |
| SearchIndexFieldDefinition[] | $subfields = [] |
| Subfields. More... | |
| int | $type |
| Type of the field, one of the constants above. 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 = 6 |
| const | INDEX_TYPE_DATETIME = 4 |
| const | INDEX_TYPE_INTEGER = 2 |
| const | INDEX_TYPE_KEYWORD = 1 |
| const | INDEX_TYPE_NESTED = 5 |
| const | INDEX_TYPE_NUMBER = 3 |
| const | INDEX_TYPE_TEXT = 0 |
| Field types. More... | |
Basic infrastructure of the field definition.
Specific engines will need to override it at least for getMapping, but can reuse other parts.
Definition at line 9 of file SearchIndexFieldDefinition.php.
| SearchIndexFieldDefinition::__construct | ( | $name, | |
| $type | |||
| ) |
SearchIndexFieldDefinition constructor.
| string | $name | Field name |
| int | $type | Index type |
Definition at line 39 of file SearchIndexFieldDefinition.php.
| SearchIndexFieldDefinition::checkFlag | ( | $flag | ) |
Check if flag is set.
| $flag |
Implements SearchIndexField.
Definition at line 81 of file SearchIndexFieldDefinition.php.
References flags.
| SearchIndexFieldDefinition::getIndexType | ( | ) |
Get index type.
Definition at line 56 of file SearchIndexFieldDefinition.php.
References $type.
| SearchIndexFieldDefinition::getName | ( | ) |
Get field name.
Definition at line 48 of file SearchIndexFieldDefinition.php.
References $name.
| SearchIndexFieldDefinition::getSubfields | ( | ) |
Get subfields.
Definition at line 105 of file SearchIndexFieldDefinition.php.
References $subfields.
| SearchIndexFieldDefinition::merge | ( | SearchIndexField | $that | ) |
Merge two field definitions if possible.
| SearchIndexField | $that |
Implements SearchIndexField.
Definition at line 91 of file SearchIndexFieldDefinition.php.
References type.
| SearchIndexFieldDefinition::setFlag | ( | $flag, | |
$unset = false |
|||
| ) |
Set global flag for this field.
| int | $flag | Bit flag to set/unset |
| bool | $unset | True if flag should be unset, false by default |
Implements SearchIndexField.
Definition at line 67 of file SearchIndexFieldDefinition.php.
References flags.
| SearchIndexFieldDefinition::setSubfields | ( | array | $subfields | ) |
Set subfields.
| SearchIndexFieldDefinition[] | $subfields |
Definition at line 114 of file SearchIndexFieldDefinition.php.
References $subfields.
|
protected |
Bit flags for the field.
Definition at line 27 of file SearchIndexFieldDefinition.php.
|
protected |
Name of the field.
Definition at line 15 of file SearchIndexFieldDefinition.php.
Referenced by __construct(), and getName().
|
protected |
Subfields.
Definition at line 32 of file SearchIndexFieldDefinition.php.
Referenced by getSubfields(), and setSubfields().
|
protected |
Type of the field, one of the constants above.
Definition at line 21 of file SearchIndexFieldDefinition.php.
Referenced by __construct(), and getIndexType().