Skip to content

Typesense throwing errors whith latest v10.11.3 update #865

@Braunson

Description

@Braunson

Scout Version

10.11.3

Scout Driver

Typesense

Laravel Version

10.48.2

PHP Version

8.2.23

Database Driver & Version

No response

SDK Version

No response

Meilisearch CLI Version

No response

Description

The most recent MR #858 causes an issue with Typesense. For example, this code works:

$results = Names::search($this->keyword)
    ->options([
        'filter_by' => $this->buildFilterString(),
        'sort_by' => implode(',', $this->sortBy),
    ])
    ->paginate(48);

But if I drop in this line between options and paginate:

->query(fn (Builder $query) => $query->with('someRelation'))

We then get this error back from Typesense:

Only up to 250 hits can be fetched per page.

The only solution to solve that is to again set the per_page option to match the ->paginate() value.

It looks like adding back #824 resolves this.

Steps To Reproduce

  1. Install Laravel Scout, Typesense
  2. Setup model with thousands of records and import with Scout
  3. Setup model relation
  4. Use query above using code to re-test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions