Skip to content

Commit 47f8557

Browse files
committed
Update models.
1 parent c383407 commit 47f8557

File tree

5 files changed

+289
-17
lines changed

5 files changed

+289
-17
lines changed

src/main/java/org/typesense/model/ApiKeySchema.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
public class ApiKeySchema {
1919

2020
@Schema(description = "")
21+
private String value = null;
22+
23+
@Schema(required = true, description = "")
2124
private String description = null;
2225

2326
@Schema(required = true, description = "")
@@ -28,6 +31,24 @@ public class ApiKeySchema {
2831

2932
@Schema(description = "")
3033
private Long expiresAt = null;
34+
/**
35+
* Get value
36+
* @return value
37+
**/
38+
@JsonProperty("value")
39+
public String getValue() {
40+
return value;
41+
}
42+
43+
public void setValue(String value) {
44+
this.value = value;
45+
}
46+
47+
public ApiKeySchema value(String value) {
48+
this.value = value;
49+
return this;
50+
}
51+
3152
/**
3253
* Get description
3354
* @return description
@@ -116,6 +137,7 @@ public String toString() {
116137
StringBuilder sb = new StringBuilder();
117138
sb.append("class ApiKeySchema {\n");
118139

140+
sb.append(" value: ").append(toIndentedString(value)).append("\n");
119141
sb.append(" description: ").append(toIndentedString(description)).append("\n");
120142
sb.append(" actions: ").append(toIndentedString(actions)).append("\n");
121143
sb.append(" collections: ").append(toIndentedString(collections)).append("\n");

src/main/java/org/typesense/model/CollectionSchema.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class CollectionSchema {
2424
**/
2525
private String name = null;
2626

27-
@Schema(example = "[{\"name\":\"company_name\",\"type\":\"string\",\"facet\":false},{\"name\":\"num_employees\",\"type\":\"int32\",\"facet\":false},{\"name\":\"country\",\"type\":\"string\",\"facet\":true}]", required = true, description = "A list of fields for querying, filtering and faceting")
27+
@Schema(example = "[{\"name\":\"num_employees\",\"type\":\"int32\",\"facet\":false},{\"name\":\"company_name\",\"type\":\"string\",\"facet\":false},{\"name\":\"country\",\"type\":\"string\",\"facet\":true}]", required = true, description = "A list of fields for querying, filtering and faceting")
2828
/**
2929
* A list of fields for querying, filtering and faceting
3030
**/
@@ -42,6 +42,12 @@ public class CollectionSchema {
4242
**/
4343
private List<String> tokenSeparators = null;
4444

45+
@Schema(example = "true", description = "Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later.")
46+
/**
47+
* Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later.
48+
**/
49+
private Boolean enableNestedFields = false;
50+
4551
@Schema(description = "List of symbols or special characters to be indexed. ")
4652
/**
4753
* List of symbols or special characters to be indexed.
@@ -129,6 +135,24 @@ public CollectionSchema addTokenSeparatorsItem(String tokenSeparatorsItem) {
129135
return this;
130136
}
131137

138+
/**
139+
* Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version &#x60;0.24.0.rcn34&#x60; or later.
140+
* @return enableNestedFields
141+
**/
142+
@JsonProperty("enable_nested_fields")
143+
public Boolean isEnableNestedFields() {
144+
return enableNestedFields;
145+
}
146+
147+
public void setEnableNestedFields(Boolean enableNestedFields) {
148+
this.enableNestedFields = enableNestedFields;
149+
}
150+
151+
public CollectionSchema enableNestedFields(Boolean enableNestedFields) {
152+
this.enableNestedFields = enableNestedFields;
153+
return this;
154+
}
155+
132156
/**
133157
* List of symbols or special characters to be indexed.
134158
* @return symbolsToIndex
@@ -162,6 +186,7 @@ public String toString() {
162186
sb.append(" fields: ").append(toIndentedString(fields)).append("\n");
163187
sb.append(" defaultSortingField: ").append(toIndentedString(defaultSortingField)).append("\n");
164188
sb.append(" tokenSeparators: ").append(toIndentedString(tokenSeparators)).append("\n");
189+
sb.append(" enableNestedFields: ").append(toIndentedString(enableNestedFields)).append("\n");
165190
sb.append(" symbolsToIndex: ").append(toIndentedString(symbolsToIndex)).append("\n");
166191
sb.append("}");
167192
return sb.toString();

src/main/java/org/typesense/model/FacetCountsStats.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,33 @@
1616
public class FacetCountsStats {
1717

1818
@Schema(description = "")
19-
private Integer max = null;
19+
private Double max = null;
2020

2121
@Schema(description = "")
22-
private Integer min = null;
22+
private Double min = null;
2323

2424
@Schema(description = "")
25-
private Integer sum = null;
25+
private Double sum = null;
2626

2727
@Schema(description = "")
2828
private Integer totalValues = null;
2929

3030
@Schema(description = "")
31-
private Float avg = null;
31+
private Double avg = null;
3232
/**
3333
* Get max
3434
* @return max
3535
**/
3636
@JsonProperty("max")
37-
public Integer getMax() {
37+
public Double getMax() {
3838
return max;
3939
}
4040

41-
public void setMax(Integer max) {
41+
public void setMax(Double max) {
4242
this.max = max;
4343
}
4444

45-
public FacetCountsStats max(Integer max) {
45+
public FacetCountsStats max(Double max) {
4646
this.max = max;
4747
return this;
4848
}
@@ -52,15 +52,15 @@ public FacetCountsStats max(Integer max) {
5252
* @return min
5353
**/
5454
@JsonProperty("min")
55-
public Integer getMin() {
55+
public Double getMin() {
5656
return min;
5757
}
5858

59-
public void setMin(Integer min) {
59+
public void setMin(Double min) {
6060
this.min = min;
6161
}
6262

63-
public FacetCountsStats min(Integer min) {
63+
public FacetCountsStats min(Double min) {
6464
this.min = min;
6565
return this;
6666
}
@@ -70,15 +70,15 @@ public FacetCountsStats min(Integer min) {
7070
* @return sum
7171
**/
7272
@JsonProperty("sum")
73-
public Integer getSum() {
73+
public Double getSum() {
7474
return sum;
7575
}
7676

77-
public void setSum(Integer sum) {
77+
public void setSum(Double sum) {
7878
this.sum = sum;
7979
}
8080

81-
public FacetCountsStats sum(Integer sum) {
81+
public FacetCountsStats sum(Double sum) {
8282
this.sum = sum;
8383
return this;
8484
}
@@ -106,15 +106,15 @@ public FacetCountsStats totalValues(Integer totalValues) {
106106
* @return avg
107107
**/
108108
@JsonProperty("avg")
109-
public Float getAvg() {
109+
public Double getAvg() {
110110
return avg;
111111
}
112112

113-
public void setAvg(Float avg) {
113+
public void setAvg(Double avg) {
114114
this.avg = avg;
115115
}
116116

117-
public FacetCountsStats avg(Float avg) {
117+
public FacetCountsStats avg(Double avg) {
118118
this.avg = avg;
119119
return this;
120120
}

src/main/java/org/typesense/model/MultiSearchParameters.java

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ public class MultiSearchParameters {
4444
**/
4545
private String prefix = null;
4646

47+
@Schema(description = "If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results")
48+
/**
49+
* If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results
50+
**/
51+
private String infix = null;
52+
53+
@Schema(description = "There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query \"K2100\" has 2 extra symbols in \"6PK2100\". By default, any number of prefixes/suffixes can be present for a match.")
54+
/**
55+
* There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query \"K2100\" has 2 extra symbols in \"6PK2100\". By default, any number of prefixes/suffixes can be present for a match.
56+
**/
57+
private Integer maxExtraPrefix = null;
58+
59+
@Schema(description = "There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query \"K2100\" has 2 extra symbols in \"6PK2100\". By default, any number of prefixes/suffixes can be present for a match.")
60+
/**
61+
* There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query \"K2100\" has 2 extra symbols in \"6PK2100\". By default, any number of prefixes/suffixes can be present for a match.
62+
**/
63+
private Integer maxExtraSuffix = null;
64+
4765
@Schema(example = "num_employees:>100 && country: [USA, UK]", description = "Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&.")
4866
/**
4967
* Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&.
@@ -301,6 +319,60 @@ public MultiSearchParameters prefix(String prefix) {
301319
return this;
302320
}
303321

322+
/**
323+
* If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; &#x60;off&#x60; infix search is disabled, which is default &#x60;always&#x60; infix search is performed along with regular search &#x60;fallback&#x60; infix search is performed if regular search does not produce results
324+
* @return infix
325+
**/
326+
@JsonProperty("infix")
327+
public String getInfix() {
328+
return infix;
329+
}
330+
331+
public void setInfix(String infix) {
332+
this.infix = infix;
333+
}
334+
335+
public MultiSearchParameters infix(String infix) {
336+
this.infix = infix;
337+
return this;
338+
}
339+
340+
/**
341+
* There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query \&quot;K2100\&quot; has 2 extra symbols in \&quot;6PK2100\&quot;. By default, any number of prefixes/suffixes can be present for a match.
342+
* @return maxExtraPrefix
343+
**/
344+
@JsonProperty("max_extra_prefix")
345+
public Integer getMaxExtraPrefix() {
346+
return maxExtraPrefix;
347+
}
348+
349+
public void setMaxExtraPrefix(Integer maxExtraPrefix) {
350+
this.maxExtraPrefix = maxExtraPrefix;
351+
}
352+
353+
public MultiSearchParameters maxExtraPrefix(Integer maxExtraPrefix) {
354+
this.maxExtraPrefix = maxExtraPrefix;
355+
return this;
356+
}
357+
358+
/**
359+
* There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query \&quot;K2100\&quot; has 2 extra symbols in \&quot;6PK2100\&quot;. By default, any number of prefixes/suffixes can be present for a match.
360+
* @return maxExtraSuffix
361+
**/
362+
@JsonProperty("max_extra_suffix")
363+
public Integer getMaxExtraSuffix() {
364+
return maxExtraSuffix;
365+
}
366+
367+
public void setMaxExtraSuffix(Integer maxExtraSuffix) {
368+
this.maxExtraSuffix = maxExtraSuffix;
369+
}
370+
371+
public MultiSearchParameters maxExtraSuffix(Integer maxExtraSuffix) {
372+
this.maxExtraSuffix = maxExtraSuffix;
373+
return this;
374+
}
375+
304376
/**
305377
* Filter conditions for refining youropen api validator search results. Separate multiple conditions with &amp;&amp;.
306378
* @return filterBy
@@ -869,6 +941,9 @@ public String toString() {
869941
sb.append(" queryBy: ").append(toIndentedString(queryBy)).append("\n");
870942
sb.append(" queryByWeights: ").append(toIndentedString(queryByWeights)).append("\n");
871943
sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n");
944+
sb.append(" infix: ").append(toIndentedString(infix)).append("\n");
945+
sb.append(" maxExtraPrefix: ").append(toIndentedString(maxExtraPrefix)).append("\n");
946+
sb.append(" maxExtraSuffix: ").append(toIndentedString(maxExtraSuffix)).append("\n");
872947
sb.append(" filterBy: ").append(toIndentedString(filterBy)).append("\n");
873948
sb.append(" sortBy: ").append(toIndentedString(sortBy)).append("\n");
874949
sb.append(" facetBy: ").append(toIndentedString(facetBy)).append("\n");

0 commit comments

Comments
 (0)