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 search #393

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

Conversation

ellnix
Copy link
Collaborator

@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

Depends on meilisearch-ruby 0.30 where MeiliSearch was also renamed.
Used this shell command to automatically rename, and then used the git
diff to manually look through and make sure nothing was wrong:
find lib/ -type f -exec sed -i 's/MeiliSearch/Meilisearch/g' {} \;
(of course also ran it for spec/ and playground/ after making sure the
soft deprecation allowed all tests to pass).

Ran into issues with the regular `const_missing` + `const_get`
deprecation having issues with autoload-ed methods. Added a temporary
workaround just for the Rails module. With this workaround there may be
cases where users are not warned for using MeiliSearch, which should be
investigated.
@ellnix ellnix added the enhancement New feature or request label Feb 6, 2025
@ellnix ellnix self-assigned this Feb 6, 2025
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 97.24771% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.03%. Comparing base (385b278) to head (1e3c302).

Files with missing lines Patch % Lines
lib/meilisearch-rails.rb 94.44% 1 Missing ⚠️
lib/meilisearch/rails/pagination/kaminari.rb 50.00% 1 Missing ⚠️
lib/meilisearch/rails/pagination/will_paginate.rb 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #393      +/-   ##
==========================================
+ Coverage   89.19%   90.03%   +0.84%     
==========================================
  Files          13       14       +1     
  Lines         768      833      +65     
==========================================
+ Hits          685      750      +65     
  Misses         83       83              

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

@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
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
1 participant