问题标签 [algolia]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
268 浏览

ruby-on-rails - Algolia Rails:无法访问任何主机

我已将Rails.application.config.session_store密钥更改为新密钥,以强制我的所有设计用户重新连接。

这样做的副作用是现在我无法以某种方式连接到 Algolia,即使我在 Algolia 中使用新索引和新 API 密钥创建了一个全新的应用程序。

我已经搜索了关于github repo的问题和代码的错误,但没有成功。

这是错误:

知道问题的原因可能是什么吗?

0 投票
1 回答
337 浏览

algolia - Algolia Search Facet 地理定位

我们正在经营一家 Magento 商店,我们希望在客户区域展示产品。我们如何才能在一个方面实现这一点,比如价格范围?只是我们把距离作为一个范围。

对于登录的客户,我们可以使用客户地址作为参考点。对于客人,我们可以使用 IP 作为后备。

0 投票
1 回答
53 浏览

algolia - 创建从站时,我至少需要覆盖哪些属性?

关于创建从属设备时应覆盖哪些属性,文档令人困惑。看来这customRanking是 Algolia 建议覆盖的唯一字段。所有其他属性将在创建从属时从主索引复制。

attributesForFaceting和怎么样attributesToIndex?从属需要显式设置它们还是默认从父级继承?

0 投票
1 回答
311 浏览

ruby-on-rails - 基于Rails关联的Algolia搜索标签,创建/销毁关联时如何更新标签?

我有一个简单的 algolia 设置,有几个模型,每个模型都有一些属性,例如:

上面的设置很容易让我限制每个用户的搜索结果,以便用户只能看到他们有权查看它们是否在 Rails 应用程序中关联/相关的记录。

但是,当Connection模型被创建或销毁时,User模型是不知道的,因此会对搜索结果产生负面影响。

如何向Connection模型添加 ActiveRecord 回调并相应地更新_tags记录上的键,以便_tags更新为包含或排除(基于创建或销毁)?

tldr:_tags在 Algolia 中的记录具有['user_1', 'user_2']由 Rails 中的关联确定的值。Algolia 中的记录与user_2Rails 中的 DB 之间的关联已从数据库中删除,如何user_2从 Algolia 中记录的标签数组中删除?

0 投票
1 回答
786 浏览

php - Algolia 无法解析主机

我刚刚为 Algolia 创建了一个用户。但是当我尝试通过 API 连接时,我收到一条错误消息,显示“无法解析主机”,它尝试的是所有不同的 Algolia 主机。我在他们的网站上使用了该指南,并尝试通过香草 PHP 和 Laravel 连接。

我看到另一个有这个问题的人(Algolia Rails),他说要等几个小时,而我此时已经等了 5 个多小时.. 仍然没有像他那样的解决方案。

可能是什么,我应该继续等待吗?还是Algolia那边有问题?

0 投票
2 回答
589 浏览

android - 从 HTTP Post 获取 JSON 到 Android 上的 Algolia 服务器

不确定如何在 Android 中使用 Java 正确地将 POST 查询的标头组合到 Algolia 服务器。

我通过在 Chrome 的开发控制台中记录网络信息获得了有关请求标头的所有信息

我有查询字符串参数:

  • x-algolia-api-key
  • x-algolia-应用程序 ID
  • x-algolia-代理

和表单数据参数

  • 询问
  • 每页点击数
  • 刻面

不工作的Android代码:

这一直返回 404 错误,但可能设置不正确,对于 Android 上的网络连接来说真的很新,任何帮助!

0 投票
1 回答
171 浏览

parse-platform - 将 Parse 类导入到 algolia

我正在尝试将我的课程(2500 条记录)从 Parse.com 导入到 Algolia 索引中。默认情况下限制为 100 条记录,这显然不适合我。即使我使用query.limit = 1000;

下面的代码如何用于导入我的整个班级?

0 投票
1 回答
198 浏览

javascript - Algolia Magento Extension: Rendering Twice Due to Off-Canvas Menu, Not Using Algolia Results Page

I've done as much as I can to try to figure out what is going on here to no avail.

I installed Algolia, as per the instructions, on my local development instance of a client website. After disabling Elasticsearch, I can inspect element and see that the algolia-searchbox div shows up properly. However, it does not work as it is supposed to. It seems to be using the magento search functionality even though that search is within the algolia searchbox.

I dug a little deeper. I found out that the topsearch was being rendered twice on the page due to the off-canvas menu. When I shrink my window down to the appropriate size for show-for-small-only to render, the search is ALSO in that section, but it actually works as the Algolia search is supposed to work.

So the first question is: what is the best way to get this to work with responsive designs utilizing the off-canvas menu functionalities? The off-canvas menu, rendered second, ends up overriding what was done to the normal topsearch area due to it rendering twice and this is a huge problem

The only way I have been able to see the correct search bar on normal header so far is to put this in the algoliasearch.xml:

This completely gets rid of my header, but it actually displays the correct search bar. I know it isn't correct syntaxt, but when troubleshooting...

The second issue I am facing is that, even when I utilize the search bar that actually shows up (via the above header xml piece or by using the smaller browser size to render the off canvas menu search), the results page I end up on is the normal Magento results page. I can see activity in the Network panel when I am typing into the search bar, but as soon as I submit, it all disappears and stays blank.

Thanks for any help you can offer.

0 投票
1 回答
1276 浏览

algolia - Algolia 有推荐搜索吗?

我想知道 Algolia 服务在进行搜索时是否提供某种推荐机制。

我在 API 文档中找不到任何与基于索引数据为客户端提供更精细和智能的搜索选项相关的内容。

我试图描述的场景如下(这个例子有点过头了):

假设用户正在搜索“红色汽车”,那么系统会提供更具体的搜索选项以及数据库中可能存在的相关项目(例如,法拉利、红色驾驶手套、速度与激情的配乐 :-))

更新

为了将来参考,我最终使用 Algolia 的文本搜索功能做了一个基本的推荐系统。

总结一下,car保存时的属性color, speed,等用于创建同义词索引,engine例如引擎索引: 最后,每个索引必须指明搜索的属性,并作为搜索的返回结果。engine ferrari { synonyms: ['red', 'ferrari', 'fast'], value: 'ferrari' } synonymsvalue

0 投票
1 回答
119 浏览

javascript - Algolia Search 预输入实现

我有一个关于 Algolia 的索引,其中包含这样的项目:

几乎所有索引都将edited_by_admin属性设置为“0”,不到一半的索引将此属性设置为“1”。

我想知道是否有一种方法可以强制使用 typeahead 进行搜索,以仅搜索属性editor_by_admin设置为"1"的项目。

我需要这个,因为具有某些权限的用户只能搜索edited_by_admin = 1的项目,而管理员可以搜索所有结果,我想对两者使用相同的索引。

提前致谢!