Algolia 搜索网络错误 [英] Algolia Search Network Error

查看:23
本文介绍了Algolia 搜索网络错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 Algolia 与我拥有的 Firebase 项目连接起来.我正在使用 Firebase Cloud Functions 以保持我的 Algolia 索引与我的 Firebase 数据库中发生的所有更改同步.但每当我打电话

I'm connecting Algolia with a Firebase project I have. I'm using the Firebase Cloud Functions in order to keep my Algolia index synced with all changes that occur in my Firebase database. But whenever I call

index.saveObject(firebaseObject);

index.saveObject(firebaseObject);

从我的 Firebase Cloud Functions 内部,我得到

from inside my Firebase Cloud Functions, I get

AlgoliaSearchNetworkError: getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet.com 5sffby8as8-1.algolianet.com:443

AlgoliaSearchNetworkError: getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet.com 5sffby8as8-1.algolianet.com:443

我可以在 Firebase Functions 之外(仅在我自己的机器上)运行同步操作.此代码通过 node.js 在 javascript 文件中运行.

I can run the syncing operation just fine outside of Firebase Functions (just on my own machine). This code is run in a javascript file through node.js.

在我的任何搜索中,我都没有找到任何当前的问题或答案.有什么想法或帮助吗?

I haven't found any current questions or answers about this in any of my searches. Any ideas or help?

推荐答案

我发现 Firebase(我使用的免费层)上的 Spark 计划不允许对 3rd 方 API 的出站请求.我必须升级到付费计划之一(Flame 或 Blaze)才能从 Firebase Cloud Functions 内连接到 Algolia 网络.

I found out that the Spark plan on Firebase (the free-tier that I was using) doesn't allow outbound requests to 3rd-party APIs. I had to upgrade to one of the paid plans (Flame or Blaze) to be able to connect to the Algolia network from within the Firebase Cloud Functions.

他们的入门指南中包含了一个警告.

A caveat was included in their getting started guide.

这篇关于Algolia 搜索网络错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆