Code Monkey home page Code Monkey logo

nativescript-algolia's People

Contributors

arpit2438735 avatar keerl avatar nampil avatar shiv19 avatar techcraver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shiv19 nampil keerl

nativescript-algolia's Issues

initializing several indices always refers the the last index initialized

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.

Action required: Greenkeeper could not be activated 🚨

🚨 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.

geosearch aroundLatLng error

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));
              }

          });

NativeScript iOS Build Fails With AlgoliaSearch-Client-Swift

[!] 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.

README is wrong

Wrong:

// firstname
index.search('jimmie', function(err, content) {
  console.log(content.hits);
});

Correct:

// firstname
index.search('jimmie', function(content, err) {
  console.log(content.hits);
});

Already has a platform set

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

NS 4 - iOS - App crash because of algolia plugin

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

Error using hits per page

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

Cannot read property 'extend' of undefined

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)

Won't compile on iOS with NativeScript 5.2 (SWIFT_VERSION)

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 parms in query for Search

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());
  }
});

Action required: Greenkeeper could not be activated 🚨

🚨 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.

IOS: multipage search - page parameter not changing on successive searches

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

Blackout on iOS without showing error

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?

Swift 4 Support

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.

adding a geo search

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?

Support for realtime full-text search / faceting

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.