27
27
/**
28
28
* @author Mark Vollmary
29
29
* @author Heiko Kernbach
30
+ * @author Michele Rastelli
31
+ * @see <a href="https://www.arangodb.com/docs/stable/http/views-arangosearch.html">API Documentation</a>
30
32
*/
31
33
public class ArangoSearchProperties {
32
34
@@ -36,11 +38,14 @@ public class ArangoSearchProperties {
36
38
private ConsolidationPolicy consolidationPolicy ;
37
39
private final Collection <PrimarySort > primarySorts ;
38
40
private final Collection <CollectionLink > links ;
41
+ private ArangoSearchCompression primarySortCompression ;
42
+ private final Collection <StoredValue > storedValues ;
39
43
40
44
public ArangoSearchProperties () {
41
45
super ();
42
46
links = new ArrayList <>();
43
47
primarySorts = new ArrayList <>();
48
+ storedValues = new ArrayList <>();
44
49
}
45
50
46
51
public Long getCommitIntervalMsec () {
@@ -90,4 +95,32 @@ public Collection<PrimarySort> getPrimarySort() {
90
95
public void addPrimarySort (final PrimarySort ... primarySorts ) {
91
96
this .primarySorts .addAll (Arrays .asList (primarySorts ));
92
97
}
98
+
99
+ /**
100
+ * @return Defines how to compress the primary sort data (introduced in v3.7.0). ArangoDB v3.5 and v3.6 always
101
+ * compress the index using LZ4.
102
+ * @since ArangoDB 3.7
103
+ */
104
+ public ArangoSearchCompression getPrimarySortCompression () {
105
+ return primarySortCompression ;
106
+ }
107
+
108
+ public void setPrimarySortCompression (ArangoSearchCompression primarySortCompression ) {
109
+ this .primarySortCompression = primarySortCompression ;
110
+ }
111
+
112
+ /**
113
+ * @return An array of objects to describe which document attributes to store in the View index. It can then cover
114
+ * search queries, which means the data can be taken from the index directly and accessing the storage engine can be
115
+ * avoided.
116
+ * @since ArangoDB 3.7
117
+ */
118
+ public Collection <StoredValue > getStoredValues () {
119
+ return storedValues ;
120
+ }
121
+
122
+ public void addStoredValues (final StoredValue ... storedValues ) {
123
+ this .storedValues .addAll (Arrays .asList (storedValues ));
124
+ }
125
+
93
126
}
0 commit comments