79 public function setFlag( $flag, $unset =
false ) {
81 $this->flags &= ~$flag;
83 $this->flags |= $flag;
96 return $this->flags & $flag;
107 if ( !empty( $this->mergeCallback ) ) {
108 return call_user_func( $this->mergeCallback, $this, $that );
111 if ( ( $that instanceof
self ) && $this->type === $that->type &&
112 $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
149 $this->mergeCallback = $callback;
Contain a class for special pages Stable to extend.
Basic infrastructure of the field definition.
getIndexType()
Get index type.
__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.
getSubfields()
Get subfields.
setSubfields(array $subfields)
Set 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.