@@ -128,7 +128,7 @@ public class Query : Printable {
128128 public var numericFilters : [ String ] ?
129129
130130 /// The full text query.
131- public var fullTextQuery : String ?
131+ public var query : String ?
132132
133133 /// How the query words are interpreted.
134134 public var queryType : QueryType ?
@@ -178,10 +178,25 @@ public class Query : Printable {
178178 get { return " Query = \( buildURL ( ) ) " }
179179 }
180180
181+ @availability ( * , deprecated= 1.2 . 1 , message= " Use the new API: Query.query: String? " )
182+ public var fullTextQuery : String ? {
183+ get {
184+ return query
185+ }
186+ set {
187+ query = newValue
188+ }
189+ }
190+
181191 // MARK: - Methods
182192
183- public init ( fullTextQuery: String ? = nil ) {
184- self . fullTextQuery = fullTextQuery
193+ @availability ( * , deprecated= 1.2 . 1 , message= " Use the new API: Query(text: String?) " )
194+ public init ( fullTextQuery: String ) {
195+ self . query = fullTextQuery
196+ }
197+
198+ public init ( query: String ? = nil ) {
199+ self . query = query
185200 }
186201
187202 /// Search for entries around a given latitude/longitude.
@@ -349,8 +364,8 @@ public class Query : Printable {
349364 if aroundLatLongViaIP {
350365 url. append ( Query . encodeForQuery ( aroundLatLongViaIP, withKey: " aroundLatLngViaIP " ) )
351366 }
352- if let fullTextQuery = fullTextQuery {
353- url. append ( Query . encodeForQuery ( fullTextQuery , withKey: " query " ) )
367+ if let query = query {
368+ url. append ( Query . encodeForQuery ( query , withKey: " query " ) )
354369 }
355370 if let restrictSearchableAttributes = restrictSearchableAttributes {
356371 url. append ( Query . encodeForQuery ( restrictSearchableAttributes, withKey: " restrictSearchableAttributes " ) )
0 commit comments