arpit2438735 / nativescript-algolia Goto Github PK
View Code? Open in Web Editor NEWNativescript library for algolia search
License: Other
Nativescript library for algolia search
License: Other
I have code like:
const client = new Algolia(..);
const video_index = client.initIndex("videos");
const category_index = client.initIndex("categories");
function searchVideos(query) {
video_index.search(...)
}
function searchCategories(query) {
category_index.search(...)
}
However even when I call the searchVideos
function it search my category index. Is this expected? I've worked around it by creating a client
for each index.
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
hi there ,
I am writing an ios version of my android app using nativescript-angular
everytime I search aroundLatLng I get the error
Error : {"status":400,"reason":"Invalid value for "aroundLatLng" parameter, expected float"}
how do I resolve this
this.index.search(this.searchTerms , {
aroundLatLng : "37.788211,-122.41199759999999",
aroundRadius: this.radius
} , (content , err) => {
if(err){
console.log("Error : " + JSON.stringify(err));
}else{
console.log("RESULT IS : " + JSON.stringify(content));
}
});
[!] Unable to determine Swift version for the following pods:
AlgoliaSearch-Client-Swift
does not specify a Swift version and none of the targets (loopmi
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.Wrong:
// firstname
index.search('jimmie', function(err, content) {
console.log(content.hits);
});
Correct:
// firstname
index.search('jimmie', function(content, err) {
console.log(content.hits);
});
I cannot use this plugin because it adds multiple platform sets:
Installing pods...
[!] Invalid `Podfile` file: The target `Pods-middaynativescript` already has a platform set..
# from /Users/dolan/midday-nativescript/platforms/ios/Podfile:19
# -------------------------------------------
# # Begin Podfile - /Users/dolan/midday-nativescript/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile
> platform :ios, '9.0'
#
# -------------------------------------------
I am using Algolia + Firebase. Here is my PodFile:
use_frameworks!
target "middaynativescript" do
# Begin Podfile - /Users/dolan/midday-nativescript/node_modules/nativescript-algolia/platforms/ios/Podfile
platform :ios, '8.0'
pod 'AlgoliaSearch-Client-Swift', '~> 5.0'
def post_installnativescript_algolia_0 (installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
# End Podfile
# Begin Podfile - /Users/dolan/midday-nativescript/node_modules/nativescript-plugin-firebase/platforms/ios/Podfile
platform :ios, '9.0'
pod 'Firebase/Core', '~> 5.12.0'
# Authentication
pod 'Firebase/Auth'
# Realtime DB
pod 'Firebase/Database'
# Cloud Firestore
pod 'Firebase/Firestore'
# Remote Config
#pod 'Firebase/RemoteConfig'
# Performance Monitoring
#pod 'Firebase/Performance'
# Crash Reporting
#pod 'Firebase/Crash'
# Crashlytics
#pod 'Fabric'
#pod 'Crashlytics'
# Firebase Cloud Messaging (FCM)
#pod 'Firebase/Messaging'
# Firebase Cloud Storage
pod 'Firebase/Storage'
# Firebase Cloud Functions
pod 'Firebase/Functions'
# AdMob
#pod 'Firebase/AdMob'
# Invites
#pod 'Firebase/Invites'
# Dynamic Links
#pod 'Firebase/DynamicLinks'
# ML Kit
#pod 'Firebase/MLVision'
#pod 'Firebase/MLVisionTextModel'
#pod 'Firebase/MLVisionBarcodeModel'
#pod 'Firebase/MLVisionFaceModel'
#pod 'Firebase/MLVisionLabelModel'
#pod 'Firebase/MLModelInterpreter'
# Facebook Authentication
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
# Google Authentication
pod 'GoogleSignIn'
# End Podfile
post_install do |installer|
post_installnativescript_algolia_0 installer
end
end
My App is running on NativeScript 4.0.
A lot of times the app crashes because of the algolia plugin. There is no error log.
I really don't know what the issue is, but it would be nice if it would be stable.
Maybe update the plugin to the new official plugin style, and add support for Angular.
Infos:
Nativescript 4.0
Angular 5.2.10
Algolia 0.0.4
We tried to use the hitsPerPage parameter while querying the algolia index but we are getting an error as follows:
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method requestCompleted failed
TypeError: handler is not a function
File: "file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-algolia/algolia-index.js, line: 41, column: 15
StackTrace:
Frame: function:'requestCompleted', file:'file:///data/data/org.nativescript.qbank/files/app/tns_modules/nativescript-algolia/algolia-index.js', line: 41, column: 16
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1043)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:925)
at com.tns.Runtime.callJSMethod(Runtime.java:912)
at com.tns.Runtime.callJSMethod(Runtime.java:896)
at com.tns.Runtime.callJSMethod(Runtime.java:888)
at com.tns.gen.com.algolia.search.saas.CompletionHandler.requestCompleted(CompletionHandler.java:12)
at com.algolia.search.saas.AbstractClient$AsyncTaskRequest$1.onPostExecute(AbstractClient.java:702)
at com.algolia.
Our code const queries = [{
indexName: 'Questions',
query: value,
params: {
hitsPerPage: 3,
page: 0,
},
}];
this.client.search(queries, (success, error) => {
console.log("Result returned from algolia ");
});
Not sure if you got the message on upwork? please confirm
Got that error message on initialization:
System.err: TypeError: Cannot read property 'extend' of undefined
System.err: File: "file:///data/data/com.app.APP/files/app/tns_modules/nativescript-algolia/algolia-index.js, line: 35, column: 65
System.err:
System.err: StackTrace:
System.err: Frame: function:'', file:'file:///data/data/com.app.APP/files/app/tns_modules/nativescript-algolia/algolia-index.js', line: 35, column: 66
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/com.app.APP/files/app/tns_modules/nativescript-algolia/index.js', line: 3, column: 23
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/com.app.APP/files/app/shared/services/stations.service.js', line: 5, column: 30
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/com.app.APP/files/app/shared/services/radio-player.service.js', line: 9, column: 26
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/com.app.APP/files/app/shared/components/radio-access-bar/radio-access-bar.component.js', line: 5, column: 30
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err: Frame: function:'', file:'file:///data/data/com.app.APP/files/app/shared/components/component.module.js', line: 12, column: 36
System.err: Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
I just tried installing this plugin on the newest version of NativeScript but the build it failing on iOS. This is the error I am getting:
[!] Unable to determine Swift version for the following pods:
- `AlgoliaSearch-Client-Swift` does not specify a Swift version and none of the targets (`coop`)
integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the
`SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
Support three/two params for search in index.Example is given below
index.search('query string', {
attributesToRetrieve: ['firstname', 'lastname'],
hitsPerPage: 50
}, function searchDone(err, content) {
if (err) {
console.error(err);
return;
}
for (var h in content.hits) {
console.log('Hit(' + content.hits[h].objectID + '): ' + content.hits[h].toString());
}
});
and
index.search('query string', function searchDone(err, content) {
if (err) {
console.error(err);
return;
}
for (var h in content.hits) {
console.log('Hit(' + content.hits[h].objectID + '): ' + content.hits[h].toString());
}
});
More details are here:-#5
Here's the url https://github.com/NativeScript/nativescript-plugin-seed
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
Hi Arpit
On IOS when we are passing the page parameter like so
const queries = [{
indexName: 'trial',
query: searchPhrase,
params: {
page: pageToSearchDetail.pageNo,
hitsPerPage: 20,
},
}];
Then the page parameter does not seem to be passing correstly in IOS only (in android it works fine) In IOS we are always getting the results for page 0.
Please take a look.
Thanks
tns: v4.2.0
tns-ios: 4.2.0
tested iOS: 10.3 & 12.1 (device & simulator)
nativescript-algolia: ^1.2.0
XCode: 10.1
Swift: 3.0 & 4.0 (both tried)
It blackout when calling index.search
on iOS
UPDATED: blackout once called algoliaClient.initIndex('contacts')
on iOS
Any idea?
Hello,
I am using this plugin with NativeScript-Angular 6.1 and was having build issues on iOS. The build error was "overlapping accesses to self" with the AlgoliaSearch-Client-Swift pod.
After updating the Podfile for this plugin to the following it started working fine:
`platform :ios, '8.0'
pod 'AlgoliaSearch-Client-Swift', '~> 5.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end`
I changed it to use version 5.0+ of the AlgoliaSearch Client and changed the Swift version to 4.0.
I want to do a geo search so in testing I did the following which should return 3 results. None are returned. I think the syntax is probably incorrect:
index.search(criteria, [{aroundLatLng: '41.88271, -87.62495'}, {aroundRadius: 150000}], content => {
console.log(content)
});
Can you tell me the correct syntax for adding these parameters?
This is really a great plugin!
By the way, will it support for the super duper powerful feature of Algolia (realtime full-text faceting)??
Now it seems like still have to press a button to trigger the index.search
, am I right? Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.