Comments (18)
Hi,
Well, I can make this one public if you want. But it will be able to cancel only the last 10 queries.
Do you need more?
from algoliasearch-client-swift.
Hi @dethi,
Awesome, no that would work perfectly.
I noticed that the path parameter requires endpoints that are defined internally: e.g
public func multipleQueries(queries: [AnyObject], block: CompletionHandler? = nil) {
let path = "1/indexes/*/queries"
Would it be a pain to implement the public method in a way to say: Cancel all previous X requests without specifying method and path? Or say: Cancel the previous X multipleQueries requests?
from algoliasearch-client-swift.
I will do it Thursday, with an enum to choose the type of operation to cancel. Is it ok for you?
from algoliasearch-client-swift.
Perfect, thank you so much!
Stefan
On Wed, Dec 9, 2015 at 2:10 PM, Thibault Deutsch [email protected]
wrote:
I will do it Thursday, with an enum to choose the type of operation to cancel. Is it ok for you?
Reply to this email directly or view it on GitHub:
#18 (comment)
from algoliasearch-client-swift.
Hi @sts2055
I just found that we have already a public method to cancel all the previous search, index.cancelPreviousSearch()
. Is it sufficient for you?
from algoliasearch-client-swift.
Hi @dethi, thank you for your response.
Looks like that function would work great for me.
The Index class' initialiser is currently internal:
init(client: Client, indexName: String) {
self.client = client
self.indexName = indexName
urlEncodedIndexName = indexName.urlEncode()
}
I can't use this initialiser because it isn't public.
I have been searching for another way to instantiate the Index class, but couldn't find one.
from algoliasearch-client-swift.
https://github.com/algolia/algoliasearch-client-swift/blob/master/Source/Client.swift#L229-L234 :)
from algoliasearch-client-swift.
Thank you for your help!
from algoliasearch-client-swift.
@dethi Links not working, is there anyway to achieve the same for android, please ?
from algoliasearch-client-swift.
Hi @tamimattafi, I'm not working for Algolia anymore, but my former colleagues can probably guide you.
cc @redox to ping the current project owner
from algoliasearch-client-swift.
@dethi Links not working, is there anyway to achieve the same for android, please ?
cc @redox to ping the current project owner
@PLNech & @q-litzler are definitely the right people to talk to!
from algoliasearch-client-swift.
Hello @tamimattafi,
Every request from the Android client can be cancelled by calling cancel
on its individual reference. Is this what you were looking for ?
Please note that the Android client is now in maintenance mode. This means that we no longer add feature to it, and only fix critical bugs.
We now recommend using the Kotlin client for Android development instead.
https://github.com/algolia/algoliasearch-client-kotlin
from algoliasearch-client-swift.
Hello @q-litzler, Thank you for your response
I'm considering switching to the Kotlin client but the Kotlin client requires using one of ktor's libraries, they all have some duplicated classes that prevent the IDE from compiling , is there a fix for this?
Also, my Algolia search query using the android-client isn't returning an exact result.
For example, writing the word TOTAL returns a query of 23 items, while using the search field on the web browser returns 49.
from algoliasearch-client-swift.
Can you share the exact error message for the ktor library, as well a quick overview of your gradle files ?
from algoliasearch-client-swift.
@tamimattafi can you please open an issue on https://github.com/algolia/algoliasearch-client-kotlin
from algoliasearch-client-swift.
@q-litzler I will switch to kotlin client during these 2 days, I will start an issue if needed.
from algoliasearch-client-swift.
@q-litzler I have added ktor dependency just for a simple compiling test
the result was following :
gradle sync : Success
project build/compile : Failure
Log : More than one file was found with OS independent path 'META-INF/kotlinx-io.kotlin_module'
-
excluding these classes from packaging in the gradle.build file shows more and more other duplicated classes.
-
navigating to the project libraries directory, exactly to ktor's one shows that all classes have a duplication or more.
used versions :
android studio : 3.4.1
kotlin : 1.3.41
gradle : default gradle wrapper
ktor : "io.ktor:ktor-client-android:1.2.2"
using androidx artifacts
from algoliasearch-client-swift.
Hello,
While I try to find a more proper solution to this, here is the complete list of files that you need to exclude:
packagingOptions {
exclude("META-INF/kotlinx-serialization-runtime.kotlin_module")
exclude("META-INF/kotlinx-coroutines-core.kotlin_module")
exclude("META-INF/ktor-http.kotlin_module")
exclude("META-INF/kotlinx-io.kotlin_module")
exclude("META-INF/atomicfu.kotlin_module")
exclude("META-INF/ktor-utils.kotlin_module")
exclude("META-INF/kotlinx-coroutines-io.kotlin_module")
exclude("META-INF/ktor-client-json.kotlin_module")
exclude("META-INF/ktor-client-json.kotlin_module")
exclude("META-INF/ktor-client-logging.kotlin_module")
exclude("META-INF/algoliasearch-client-kotlin.kotlin_module")
exclude("META-INF/ktor-client-core.kotlin_module")
exclude("META-INF/ktor-client-serialization.kotlin_module")
exclude("META-INF/ktor-http-cio.kotlin_module")
}
Let me know if this helps.
from algoliasearch-client-swift.
Related Issues (20)
- Algolia's use of custom operators clashes with custom operators defined in applications that consume this library HOT 3
- Error 400 when Around Precision property is assigned HOT 4
- Error 494 Header Too Large with some API Keys HOT 4
- Crash - AlgoliaSearchClient: protocol witness for Decodable.init(from:) in conformance JSON + 20 HOT 3
- Issue with query string containing & char HOT 1
- Naming clash with Swift's Task HOT 4
- Facet values with certain characters don't work HOT 2
- Client side error handling
- index.getObject() does not work with full Shopify ID
- refactor `extension URLSession: HTTPRequester`
- Reporting a vulnerability
- ThreadSanitizer: data race
- Dependency Dashboard
- Match JS library - Fetch Recommendations Using an Array of Object ID's
- Apple Privacy Manifest File HOT 5
- 8.20.0 upgrade prevents project from building HOT 4
- SearchConfiguration.logLevel has no effect
- Unknown parameter: explainModules
- Missing product package
- Async await support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from algoliasearch-client-swift.