Skip to content

Commit d683788

Browse files
committed
Rename fullTextQuery to query, close #6
1 parent 5ac0671 commit d683788

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

AlgoliaSearch-Client-Swift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = 'AlgoliaSearch-Client-Swift'
33
s.module_name = 'AlgoliaSearch'
4-
s.version = '1.2.0'
4+
s.version = '1.2.1'
55
s.license = 'MIT'
66
s.summary = 'Algolia Search API Client for iOS & OS X written in Swift.'
77
s.homepage = 'https://github.com/algolia/algoliasearch-client-swift'

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGELOG
22

3+
2015-06-09 1.2.1
4+
* Rename `fullTextQuery` to `query`
5+
36
2015-06-08 1.2.0
47
* new retry logic
58
* add new parameter on the Query: setMinProximity & setHighlightingTags

Source/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.2.0</string>
18+
<string>1.2.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Source/Query.swift

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)