Skip to content

Search views stop at 250 results because the Typesense adapter requests one page at the server's per-page maximum #608

Description

@jamiefolsom

On Global Writing Cultures (FairData Sites v1.11.0, @performant-software/core-data 3.1.25), the Geopolitical Contexts search shows "250 results" while the events collection holds 433 documents and Typesense reports found: 433 for the same query. The list, the map, and the timeline all stop at 250. Items has the same problem in waiting: 704 documents, so it also shows 250.

Cause

The Typesense InstantSearch adapter is created with additionalSearchParameters.limit: e.limit || 250 and the map view loads hits through useInfiniteHits without paging past the first page. Typesense treats limit as an alias for per_page and refuses anything above 250 (Only upto 250 hits can be fetched per page), so raising the value in a site's config.json is not a way out; the cap is the server's, and it applies per page, not per query.

Fix

Page through the results. For the map and the timeline, request pages of 250 until found is reached (or until a sensible ceiling, with the count shown honestly as "showing N of M"), and derive the result count from found rather than from the number of hits loaded. The list view already pages at 50 and only needs its count to come from found.

Observed September 2, 2026 on https://gwc.performant.studio/en/search/events/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions