78 public function setFlag( $flag, $unset =
false ) {
80 $this->flags &= ~$flag;
82 $this->flags |= $flag;
95 return $this->flags & $flag;
106 if ( !empty( $this->mergeCallback ) ) {
107 return call_user_func( $this->mergeCallback, $this, $that );
110 if ( ( $that instanceof
self ) && $this->type === $that->type &&
111 $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
146 $this->mergeCallback = $callback;
Contain a class for special pages.
Basic infrastructure of the field definition.
__construct( $name, $type)
SearchIndexFieldDefinition[] $subfields
Subfields.
getEngineHints(SearchEngine $engine)
A list of search engine hints for this field.Hints are usually specific to a search engine implementa...
string $name
Name of the field.
setMergeCallback( $callback)
Set field-specific merge strategy.
getMapping(SearchEngine $engine)
merge(SearchIndexField $that)
Merge two field definitions if possible.
setFlag( $flag, $unset=false)
Set global flag for this field.
setSubfields(array $subfields)
string $type
Type of the field, one of the constants above.
int $flags
Bit flags for the field.
checkFlag( $flag)
Check if flag is set.
Definition of a mapping for the search index field.