无限搜索的 Algolia 错误

Algolia bug with Infinite Search

目前正在使用 Algolia 通过其 instantSearch.js 提供的无限搜索方法。

正在发生以下情况:

  1. 搜索项目
  2. 优化列表
  3. 加载更多页面直到第 5 页
  4. 滚动回到顶部并更改细化
  5. 什么都没发生

从外观上看 - 它将新优化的结果附加到已有的结果中。我想让它反感结果,不确定这是否是即时搜索本身的错误?

   search.addWidget(
      instantsearch.widgets.numericRefinementList({
        container: '#price',
        attributeName: 'salePrice',
        options: [
          {name: 'All'},
          {end: 20, name: 'less than 20'},
          {end: 50, name: 'less than 50'},
          {start: 50, end: 100, name: 'between 50 and 100'},
          {start: 100, end: 300, name: 'Expensive'},
          {start: 300, name: 'Very Expensive'}
        ],
        templates: {
          header: 'Price'
        }
      })
    );

和无限搜索代码:

search.addWidget(
  instantsearch.widgets.infiniteHits({
    container: '#infinite-hits-container',
    templates: {
      empty: 'No results',
      item: hitTemplate
    },
    hitsPerPage: 3
  })
);

此问题已在 1.11.15 中修复(获取新版本的说明 is here