Algolia 搜索网络错误

编程入门 行业动态 更新时间:2024-10-10 00:26:33
本文介绍了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 5sffby8as8-1.algolianet:443

AlgoliaSearchNetworkError: getaddrinfo ENOTFOUND 5sffby8as8-1.algolianet 5sffby8as8-1.algolianet: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 搜索网络错误

本文发布于:2023-11-28 19:25:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643657.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   网络   Algolia

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!