wiki icon indicating copy to clipboard operation
wiki copied to clipboard

feat: set search results max hits and fix: total hits displayed instead of max hits

Open zemzot opened this issue 3 years ago • 0 comments

feat: set search results max hits

Added a new field for admins to set the maximum number of results returned from the search engine on the search engine configuration page. image(7)

fix: total hits displayed instead of max hits

Problem

Currently, if the total hits are larger than the max hits set in algolia, aws, azure, or elasticsearch search engines, when a user attempts to view pages past the max hits, the empty results page is displayed. For example, if the total hits = 23, and the max hit is set to 20, 3 page icons are generated. However, only pages 1-2 will be viewable, and if the 3rd+ page is clicked on, the empty results page is displayed. wiki js-total-hits-display-instead-of-max-hits

Solution

Display min(results returned size, max hits) instead of total hits.

zemzot avatar Jun 12 '22 23:06 zemzot