Commit dfeb312
authored
algolia: Bump pagination limit to 4000. (#758)
For the Our415 collaboration, in one of their pages, they would like to
have more than 1000 search results, which is above the default limit
that Algolia sets. Algolia allows this to be increased, though mentions
that there are performance tradeoffs involved, where bumping the number
by a lot could slow down search results.
It seems that they are looking at having up to mid 3000s, so we've
agreed that 4000 is a reasonable limit to set.
This can be configured via the `algoliasearch-rails` gem, with the
`paginationLimitedTo` property that can be set on a index. When a
resource or service gets indexed, this causes the setting to be
synchrorized to Algolia. The setting is also configurable via the web
admin site, but we choose to configure it in the code to ensure that
there is a revision controlled source of truth to these settings.
Note that this needs to be configured on both the Resource and Service
models, since we do something unusual by having both models share the
same Algolia index. Not updating both could result in the setting being
changed as the different models are indexed.1 parent 55dd383 commit dfeb312
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
0 commit comments