Skip to content

Conversation

@ellnix
Copy link
Contributor

@ellnix ellnix commented Feb 6, 2025

Pull Request

Related issue

Continues on top of #384
Fixes #389

I've got the general idea of the implementation, what's left is:

  • Finish writing tests
  • Add to README
  • Refactor (especially warnings and error handling)
  • Investigate pagination

Ready for review

@ellnix ellnix added the enhancement New feature or request label Feb 6, 2025
@ellnix ellnix self-assigned this Feb 6, 2025
@ellnix ellnix force-pushed the federated-search branch 2 times, most recently from 0a09b55 to 78d662d Compare February 7, 2025 21:25
@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.43%. Comparing base (31b9eaf) to head (8cb1a8d).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #393      +/-   ##
==========================================
+ Coverage   89.62%   90.43%   +0.80%     
==========================================
  Files          13       14       +1     
  Lines         781      847      +66     
==========================================
+ Hits          700      766      +66     
  Misses         81       81              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ellnix ellnix marked this pull request as ready for review February 7, 2025 21:30
@ellnix ellnix requested a review from brunoocasali February 7, 2025 21:30
@ellnix ellnix changed the title WIP: Add federated search Add federated search Feb 7, 2025
@wesharper
Copy link

My team has been using the forked repo's branch in our staging environment and everything is working smoothly. We will push to prod soon, but would love to see this hit the mainline release pipeline before pulling the trigger in an ideal world.

@brunoocasali
Copy link
Member

I will review this after the rebase or the merge of the class name change :)

@ellnix ellnix force-pushed the federated-search branch from 1e3c302 to d4080ed Compare March 19, 2025 14:29
end

MultiSearchResult.new(searches, client.multi_search(search_parameters))
MultiSearchResult.new(searches, client.multi_search(queries: search_parameters))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is necessary due to this change in ms-ruby: meilisearch/meilisearch-ruby@055f7d0

@ellnix ellnix force-pushed the federated-search branch 2 times, most recently from 5a0b981 to d2ab989 Compare March 19, 2025 15:18
@ellnix
Copy link
Contributor Author

ellnix commented Mar 19, 2025

@brunoocasali Rebased and also removed :class_name option similar to #405


return if pagination_options.empty?

Meilisearch::Rails.logger.warn <<~WRONG_PAGINATION
Copy link
Member

Choose a reason for hiding this comment

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

These warnings will be very helpful!

[condition_key, results_by_id]
end

def pk_is_virtual?(model_class, pk_method)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this code comes from the meilisearch-rails main class, we can think in ways to make them reused across the whole gem.

Copy link
Contributor Author

@ellnix ellnix Mar 24, 2025

Choose a reason for hiding this comment

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

Yeah, I plan to remove them entirely 😆 if we go with the plan of enforcing the ms primary key to be same as the primary key of the model.

brunoocasali
brunoocasali previously approved these changes Mar 24, 2025
@ellnix ellnix force-pushed the federated-search branch from da5d6f5 to 8cb1a8d Compare March 24, 2025 20:11
@ellnix
Copy link
Contributor Author

ellnix commented Mar 24, 2025

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Mar 24, 2025

@meili-bors meili-bors bot merged commit a35652c into meilisearch:main Mar 24, 2025
12 checks passed
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.

Support federated search

3 participants