@@ -15,6 +15,7 @@ public class InvertedIndexField implements Entity {
15
15
private Boolean includeAllFields ;
16
16
private Boolean searchField ;
17
17
private Boolean trackListPositions ;
18
+ private Boolean cache ;
18
19
private final Set <AnalyzerFeature > features = new HashSet <>();
19
20
private Collection <InvertedIndexField > nested ;
20
21
@@ -103,6 +104,23 @@ public InvertedIndexField trackListPositions(Boolean trackListPositions) {
103
104
return this ;
104
105
}
105
106
107
+ public Boolean getCache () {
108
+ return cache ;
109
+ }
110
+
111
+ /**
112
+ * @param cache Enable this option to always cache the field normalization values in memory for this specific field.
113
+ * This can improve the performance of scoring and ranking queries. Otherwise, these values are
114
+ * memory-mapped and it is up to the operating system to load them from disk into memory and to evict
115
+ * them from memory. (Enterprise Edition only)
116
+ * @return this
117
+ * @since ArangoDB 3.10.2
118
+ */
119
+ public InvertedIndexField cache (Boolean cache ) {
120
+ this .cache = cache ;
121
+ return this ;
122
+ }
123
+
106
124
public Set <AnalyzerFeature > getFeatures () {
107
125
return features ;
108
126
}
@@ -139,11 +157,11 @@ public boolean equals(Object o) {
139
157
if (this == o ) return true ;
140
158
if (o == null || getClass () != o .getClass ()) return false ;
141
159
InvertedIndexField that = (InvertedIndexField ) o ;
142
- return Objects .equals (name , that .name ) && Objects .equals (analyzer , that .analyzer ) && Objects .equals (includeAllFields , that .includeAllFields ) && Objects .equals (searchField , that .searchField ) && Objects .equals (trackListPositions , that .trackListPositions ) && Objects .equals (features , that .features ) && Objects .equals (nested , that .nested );
160
+ return Objects .equals (name , that .name ) && Objects .equals (analyzer , that .analyzer ) && Objects .equals (includeAllFields , that .includeAllFields ) && Objects .equals (searchField , that .searchField ) && Objects .equals (trackListPositions , that .trackListPositions ) && Objects .equals (cache , that . cache ) && Objects . equals ( features , that .features ) && Objects .equals (nested , that .nested );
143
161
}
144
162
145
163
@ Override
146
164
public int hashCode () {
147
- return Objects .hash (name , analyzer , includeAllFields , searchField , trackListPositions , features , nested );
165
+ return Objects .hash (name , analyzer , includeAllFields , searchField , trackListPositions , cache , features , nested );
148
166
}
149
167
}
0 commit comments