Skip to content

Federated multi-search example does not work #685

@thijskuilman

Description

@thijskuilman

Description
I'm using the federated multi-search feature of Meilisearch. I use the code example from the docs:

$client->multiSearch([
    (new SearchQuery())
      ->setIndexUid('movies'))
      ->setQuery('batman'),
    (new SearchQuery())
      ->setIndexUid('comics')
      ->setQuery('batman'),
  ],
  (new MultiSearchFederation())
);

However, this results in the following error:

afbeelding

This error only appears when I pass an empty MultiSearchFederation() instance, like in the docs. The error does not appear when I set a property of MultiSearchFederation, like (new MultiSearchFederation())->setLimit(limit: 100).

Possible solution
See my PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions