2ea255f40083ff299a24e18a064a572355f92092
3 * Definition of a mapping for the search index field.
6 interface SearchIndexField
{
10 const INDEX_TYPE_TEXT
= 0;
11 const INDEX_TYPE_KEYWORD
= 1;
12 const INDEX_TYPE_INTEGER
= 2;
13 const INDEX_TYPE_NUMBER
= 3;
14 const INDEX_TYPE_DATETIME
= 4;
15 const INDEX_TYPE_NESTED
= 5;
16 const INDEX_TYPE_BOOL
= 6;
18 * Generic field flags.
21 * This field is case-insensitive.
23 const FLAG_CASEFOLD
= 1;
25 * This field is for scoring only.
27 const FLAG_SCORING
= 2;
29 * This field does not need highlight handling.
31 const FLAG_NO_HIGHLIGHT
= 4;
33 * Do not index this field.
35 const FLAG_NO_INDEX
= 8;
37 * Get mapping for specific search engine
38 * @param SearchEngine $engine
39 * @return array|null Null means this field does not map to anything
41 public function getMapping( SearchEngine
$engine );
43 * Set global flag for this field.
45 * @param int $flag Bit flag to set/unset
46 * @param bool $unset True if flag should be unset, false by default
49 public function setFlag( $flag, $unset = false );
51 * Check if flag is set.
53 * @return int 0 if unset, !=0 if set
55 public function checkFlag( $flag );
57 * Merge two field definitions if possible.
59 * @param SearchIndexField $that
60 * @return SearchIndexField|false New definition or false if not mergeable.
62 public function merge( SearchIndexField
$that );