无限搜索的Algolia bug

时间:2017-06-15 10:49:11

标签: algolia instantsearch.js

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

发生以下情况:

  1. 搜索项目
  2. 优化列表
  3. 加载更多页面至第5页
  4. 滚动回到顶部并更改细化
  5. 什么都没发生
  6. 从它的外观来看 - 它将新细化的结果附加到已经存在的结果中。我希望对结果感到反感,不确定这是否是即时搜索本身的错误?

       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 个答案:

答案 0 :(得分:5)

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

中修复
相关问题