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

Add federated multisearch to MeilisearchClient #571

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

apt-TebbeM
Copy link

Pull Request

Related issue

Fixes #560

What does this PR do?

  • increases meilisearch version to 1.10.0 in docker-compose.yaml
  • adds new method on MeilisearchClient for federated search
  • extracts shared properties of "FederatedSearchQuery" and "SearchQuery" into a SearchQueryBase
  • add custom JsonConverter to handle federated search in request (empty object needs to be included, cause that causes federated search to work)
  • added tests

PR checklist

Please check if your PR fulfills the following requirements:

  • [ x ] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • [ x ] Have you read the contributing guidelines?
  • [ x ] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@curquiza
Copy link
Member

Hello @apt-TebbeM

thank you for your PR! Let me know when the PR is ready 😊

@curquiza curquiza added the enhancement New feature or request label Oct 16, 2024
@apt-TebbeM apt-TebbeM marked this pull request as ready for review October 17, 2024 05:48
@apt-TebbeM
Copy link
Author

apt-TebbeM commented Oct 17, 2024

I think it could be reviewed. I actually thought about chaning the API for the federated search part to something like this:

public async Task<ISearchable<T>> FederatedMultiSearchAsync<T>(List<FederatedSearchQuery> queries,
            MultiSearchFederationOptions federationOptions = default(MultiSearchFederationOptions),
            CancellationToken cancellationToken = default)

to make it less likely to have an empty list of queries.

@apt-TebbeM
Copy link
Author

Hello @apt-TebbeM

thank you for your PR! Let me know when the PR is ready 😊

you can go ahead

@curquiza curquiza self-requested a review November 6, 2024 14:03
@apt-TebbeM
Copy link
Author

@curquiza when will this pr be reviewed? :)

@curquiza
Copy link
Member

Hello @apt-TebbeM I'm sorry but I have a loooot on my plate right now. I will maybe be able to review your PR next week. I'll do my best. But busy work period at the moment

But be sure I don't forget you!

{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters = { new MultiSearchFederationOptionsConverter() }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just add the converter as an annotation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v1.10.0] Federated search
3 participants