File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/Mapping/Settings/Mapping Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,17 @@ class Field
2121 */
2222 private $ analyzer ;
2323
24+ /**
25+ * @var bool|null
26+ */
27+ private $ fieldData ;
28+
2429
2530 public function __construct (
2631 string $ name ,
2732 string $ type = \Spameri \Elastic \Model \ValidateMapping \AllowedValues::TYPE_KEYWORD ,
28- ?\Spameri \ElasticQuery \Mapping \AnalyzerInterface $ analyzer = NULL
33+ ?\Spameri \ElasticQuery \Mapping \AnalyzerInterface $ analyzer = NULL ,
34+ ?bool $ fieldData = NULL
2935 )
3036 {
3137 $ this ->name = $ name ;
@@ -36,6 +42,7 @@ public function __construct(
3642 }
3743 $ this ->type = $ type ;
3844 $ this ->analyzer = $ analyzer ;
45+ $ this ->fieldData = $ fieldData ;
3946 }
4047
4148
@@ -57,6 +64,10 @@ public function toArray(): array
5764 $ array [$ this ->name ]['analyzer ' ] = $ this ->analyzer ->name ();
5865 }
5966
67+ if ($ this ->fieldData !== NULL ) {
68+ $ array [$ this ->name ]['fielddata ' ] = $ this ->fieldData ;
69+ }
70+
6071 return $ array ;
6172 }
6273
You can’t perform that action at this time.
0 commit comments