MediaWiki master
SearchIndexField.php
Go to the documentation of this file.
1<?php
11namespace MediaWiki\Search;
12
14 /*
15 * Field types
16 */
25 public const INDEX_TYPE_TEXT = 'text';
30 public const INDEX_TYPE_KEYWORD = 'keyword';
31 public const INDEX_TYPE_INTEGER = 'integer';
32 public const INDEX_TYPE_NUMBER = 'number';
33 public const INDEX_TYPE_DATETIME = 'datetime';
34 public const INDEX_TYPE_NESTED = 'nested';
35 public const INDEX_TYPE_BOOL = 'bool';
36
43 public const INDEX_TYPE_SHORT_TEXT = 'short_text';
44
51 public const FLAG_CASEFOLD = 1;
52
58 public const FLAG_SCORING = 2;
59
63 public const FLAG_NO_HIGHLIGHT = 4;
64
68 public const FLAG_NO_INDEX = 8;
69
75 public function getMapping( SearchEngine $engine );
76
84 public function setFlag( $flag, $unset = false );
85
91 public function checkFlag( $flag );
92
99 public function merge( SearchIndexField $that );
100
116 public function getEngineHints( SearchEngine $engine );
117}
118
120class_alias( SearchIndexField::class, 'SearchIndexField' );
Contain a class for special pages.
getEngineHints(SearchEngine $engine)
A list of search engine hints for this field.
const INDEX_TYPE_SHORT_TEXT
SHORT_TEXT is meant to be used with short text made of mostly ascii technical information.
const FLAG_SCORING
This field contains secondary information, which is already present in other fields,...
checkFlag( $flag)
Check if flag is set.
const INDEX_TYPE_TEXT
TEXT fields are suitable for natural language and may be subject to analysis such as stemming.
const FLAG_NO_INDEX
Do not index this field, just store it.
const FLAG_CASEFOLD
Generic field flags.
getMapping(SearchEngine $engine)
Get mapping for specific search engine.
const FLAG_NO_HIGHLIGHT
This field does not need highlight handling.
merge(SearchIndexField $that)
Merge two field definitions if possible.
const INDEX_TYPE_KEYWORD
KEYWORD fields are indexed without any processing, so are appropriate for e.g.
setFlag( $flag, $unset=false)
Set global flag for this field.
Definition of a mapping for the search index field.