You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/Query.swift
+26-2Lines changed: 26 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,10 @@ public class Query : Printable {
72
72
/// Defaults to 7.
73
73
publicvarminWordSizeForApprox2:UInt=7
74
74
75
+
/// Configure the precision of the proximity ranking criterion. By default, the minimum (and best) proximity value distance between 2 matching words is 1. Setting it to 2 (or 3) would allow 1 (or 2) words to be found between the matching words without degrading the proximity ranking value.
76
+
/// Considering the query "javascript framework", if you set minProximity=2 the records "JavaScript framework" and "JavaScript charting framework" will get the same proximity score, even if the second one contains a word between the 2 matching words.
77
+
publicvarminProximity:UInt=1
78
+
75
79
/// If true, the result hits will contain ranking information in _rankingInfo attribute.
76
80
/// Default to false.
77
81
publicvargetRankingInfo=false
@@ -157,10 +161,15 @@ public class Query : Printable {
157
161
/// The list of words that should be considered as optional when found in the query.
158
162
publicvaroptionalWords:[String]?
159
163
160
-
/// List of object attributes you want to use for textual search (must be a subset of the
161
-
/// attributesToIndex index setting).
164
+
/// List of object attributes you want to use for textual search (must be a subset of the attributesToIndex index setting).
162
165
publicvarrestrictSearchableAttributes:[String]?
163
166
167
+
/// Specify the string that is inserted before the highlighted parts in the query result (default to "<em>").
168
+
publicvarhighlightPreTag:String?
169
+
170
+
/// Specify the string that is inserted after the highlighted parts in the query result (default to "</em>").
171
+
publicvarhighlightPostTag:String?
172
+
164
173
privatevararoundLatLongViaIP=false
165
174
privatevararoundLatLong:String?
166
175
privatevarinsideBoundingBox:String?
@@ -232,6 +241,14 @@ public class Query : Printable {
232
241
returnself
233
242
}
234
243
244
+
/// Reset location parameters (aroundLatLong,insideBoundingBox, aroundLatLongViaIP set to false)
245
+
publicfunc resetLocationParameters()->Query{
246
+
aroundLatLong =nil
247
+
insideBoundingBox =nil
248
+
aroundLatLongViaIP =false
249
+
returnself
250
+
}
251
+
235
252
/// Return the final query string used in URL.
236
253
publicfunc buildURL()->String{
237
254
varurl=[String]()
@@ -303,6 +320,9 @@ public class Query : Printable {
0 commit comments