77 public function setFlag( $flag, $unset =
false ) {
79 $this->flags &= ~$flag;
81 $this->flags |= $flag;
92 return $this->flags & $flag;
102 if ( !empty( $this->mergeCallback ) ) {
103 return call_user_func( $this->mergeCallback, $this, $that );
106 if ( ( $that instanceof
self ) && $this->type === $that->type &&
107 $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
144 $this->mergeCallback = $callback;
Contain a class for special pages.
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.