Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federated multi-search example does not work #685

Open
thijskuilman opened this issue Oct 4, 2024 · 2 comments · May be fixed by #686
Open

Federated multi-search example does not work #685

thijskuilman opened this issue Oct 4, 2024 · 2 comments · May be fixed by #686
Labels
bug Something isn't working

Comments

@thijskuilman
Copy link

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

@thijskuilman thijskuilman linked a pull request Oct 4, 2024 that will close this issue
3 tasks
@norkunas
Copy link
Collaborator

norkunas commented Oct 4, 2024

But what's the point to send without anything?

@curquiza
Copy link
Member

curquiza commented Oct 4, 2024

But what's the point to send without anything?

You can to say you want to apply a federated search without any settings
Federated search will merge the results of your different search, contrary to a basic multi search

So, if indeed we cannot send an empty federation, it's a bug. Or maybe there is another way to do it I ignore

@curquiza curquiza added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants