JMKelley
JMKelley

Reputation: 658

Algolia bug with Infinite Search

Currently using the infinite search method that Algolia supplies through their instantSearch.js.

The following scenario is happening:

  1. Search for an item
  2. Refine the list
  3. Load more pages up to page 5
  4. Scroll back to the top and change refinement
  5. Nothing happens

By the looks of it - it's appending the results of the new refinement to the results that are already there. I'm looking to make it resent the results, not sure if this is a bug with instant search itself?

   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'
        }
      })
    );

And the infinite search code:

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

Upvotes: 0

Views: 523

Answers (1)

bobylito
bobylito

Reputation: 3392

This issues is fixed in 1.11.15 (instructions for getting the new version is here)

Upvotes: 1

Related Questions