Skip to content

More generous search #944

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

d-buchmann
Copy link
Contributor

@d-buchmann d-buchmann commented May 28, 2025

Split the keyword into tokens (at spaces).
Search for every token individually, then combine results with AND.
Caution: This has no effect on the typeahead search, I will have a look at this soon.
Should fix #892.

Split the keyword into tokens (at spaces).
Search for every token individually, then combine results with AND.
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 36.36364% with 14 lines in your changes missing coverage. Please review.

Project coverage is 59.68%. Comparing base (b8d5b83) to head (6b4ff26).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/DataTables/Filters/PartSearchFilter.php 36.36% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #944      +/-   ##
============================================
- Coverage     59.73%   59.68%   -0.05%     
- Complexity     6036     6037       +1     
============================================
  Files           529      529              
  Lines         20588    20600      +12     
============================================
- Hits          12298    12295       -3     
- Misses         8290     8305      +15     

☔ 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.

@jbtronics
Copy link
Member

I wonder if it might be better to use the fulltext seach capabilities of the database then trying to implement more complex searches ourselves.

@virtadpt
Copy link

@jbtronics Generally speaking, that's always a good idea. Let the database server do the heavy lifting.

@d-buchmann
Copy link
Contributor Author

The feature is plain simple. I just make the query more complex by splitting the search string.
So, the database server is still doing the heavy lifting, even though it's not making use of additional database features (which I didn't know of before :)
I did my research and see that native full-text search would definitely be the better solution, but as I see it, it would require quite a bit of work, because all databases have different syntax, feature sets and restrictions. Doctrine also doesn't seem to have this built-in - please correct me if I'm wrong.

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

Successfully merging this pull request may close these issues.

Better search
3 participants