无限搜索的Algolia bug

JMK*_*ley 0 algolia instantsearch.js

目前正在使用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'
        }
      })
    );
Run Code Online (Sandbox Code Playgroud)

而无限的搜索代码:

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

bob*_*ito 5

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