Commit 707dd49
authored
Add multiple validators to Parameters (#77073)
This PR implements support for multiple validators to a FieldMapper.Parameter.
The Parameter#setValidator method was replaced by Parameter#addValidator that can be called multipled times
to add validation to a parameter.
All validators of a parameter will be executed in the same order as they have been added and if any of them fails all validation will failed.1 parent ec11f9f commit 707dd49
File tree
16 files changed
+47
-36
lines changed- modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper
- plugins/analysis-icu/src/main/java/org/elasticsearch/index/mapper
- server/src
- main/java/org/elasticsearch/index/mapper
- flattened
- test/java/org/elasticsearch/index/mapper
- x-pack/plugin
- mapper-aggregate-metric/src/main/java/org/elasticsearch/xpack/aggregatemetric/mapper
- vectors/src/main/java/org/elasticsearch/xpack/vectors/mapper
- wildcard/src/main/java/org/elasticsearch/xpack/wildcard/mapper
16 files changed
+47
-36
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapper.java
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
| 686 | + | |
| 687 | + | |
687 | 688 | | |
688 | | - | |
689 | | - | |
| 689 | + | |
| 690 | + | |
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
| |||
743 | 744 | | |
744 | 745 | | |
745 | 746 | | |
746 | | - | |
747 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
748 | 750 | | |
749 | 751 | | |
750 | 752 | | |
| |||
895 | 897 | | |
896 | 898 | | |
897 | 899 | | |
898 | | - | |
| 900 | + | |
899 | 901 | | |
900 | 902 | | |
901 | 903 | | |
| |||
1079 | 1081 | | |
1080 | 1082 | | |
1081 | 1083 | | |
1082 | | - | |
| 1084 | + | |
1083 | 1085 | | |
1084 | 1086 | | |
1085 | 1087 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments