Docusaurus中的Algolia Docsearch没有带来任何结果

发布于 2025-02-12 06:14:14 字数 1021 浏览 0 评论 0 原文

我的文档站点获得了阿尔戈利亚的批准,他们的爬行者也能够在那里索引数百个唱片,因此该方面似乎有效。 在我的 docusauras.config.js 中,我在 themeconfig 下添加了以下内容:

algolia: {
  appId: '7********C',
  apiKey: '9*****************************5',
  indexName: 'o******t',
  contextualSearch: true,
},

现在出现了网站顶部的搜索栏,但在搜索时找不到任何东西:<代码>“ XYZ”没有结果;无论我寻找什么(网站上的哪个...)

任何想法我做错了什么? apikey 是“搜索API密钥”,对吗?

网站上的失败搜索:

“在此处输入图像描述”

Algolia:应用程序接口(API):

来自阿尔戈利亚的邀请/确认邮件: [来自Algolia的邮件]

“在此处输入图像描述”

my docs-site got approved from Algolia and their crawler also was able to index a few hundred records there, so that side seems to work.
In my docusauras.config.js I have added the following under themeConfig:

algolia: {
  appId: '7********C',
  apiKey: '9*****************************5',
  indexName: 'o******t',
  contextualSearch: true,
},

Now the search bar at the top of the site appears but it does not find anything when searching: No results for "xyz" ; whatever I search for (which's on the site ...)

Any ideas what I'm doing wrong? The apiKey is the "Search API Key", right?

Unsuccessfull search on site:

enter image description here

Algolia: Application interface (API):

enter image description here

Invitation/Confirmation mail from Algolia:
[mail from Algolia]

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

此刻的回忆 2025-02-19 06:14:16

https://github.com/face/face/docusaurus/issaurus/issues/7647

问题是问题Docusaurus的最新更新,因为默认情况下启用了上下文搜索。问题:Algolia的Docusaurus V1和旧Docusaurus V2版本的默认配置没有该属性配置crawler的选项。

求解:

  1. 删除当前索引
  2. 复制新的V2 Config从 https://docsearch.algolia.com/docs/templates/#docusaurus-v2-template 或直接在 https://crawler.algolia.com/admin/crawlers/create
  3. 重新运行crawler(将创建一个索引)。
  4. 重新部署了纪录片网站。

As cmgchess suggested, that's the issue I had:
https://github.com/facebook/docusaurus/issues/7647

The problem is a recent update of Docusaurus, since which contextual search is enabled by default. The problem: Algolia's default config for Docusaurus v1 and older Docusaurus v2 versions didn't have an option for this attribute to configure the crawler.

To solve:

  1. Delete the current index
  2. Copy the new v2 config from https://docsearch.algolia.com/docs/templates/#docusaurus-v2-template or directly create the crawler at https://crawler.algolia.com/admin/crawlers/create
  3. Re-run crawler (will create an index).
  4. Redeploy the Docusaurus site.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文