app/assets/javascripts/search/searcher.js in bookends-4.1.0 vs app/assets/javascripts/search/searcher.js in bookends-4.1.1rc1
- old
+ new
@@ -18,10 +18,10 @@
this.$indexSelectorContainer = $('.js-index-selector-container');
this.$indexSelectors = this.$indexSelectorContainer.find('.js-index-selector');
this.indexName = baseIndex;
this.query = this._getUrlParameter('q');
this.client = algoliasearch(appId, apiKey);
- this.helper = algoliasearchHelper(this.client, this.indexName);
+ this.helper = algoliasearchHelper(this.client, this.indexName, { distinct: true });
this.$input.on('input textInput textinput oninput change paste keyup', this.search.bind(this));
this.$indexSelectors.on('click', this.handleSelectorChange.bind(this));
this.helper.on('result', this.renderHits.bind(this));
this.init();