Skip to content

Implement advanced search#1406

Open
d-buchmann wants to merge 4 commits into
Part-DB:masterfrom
d-buchmann:advanced-search-squashed
Open

Implement advanced search#1406
d-buchmann wants to merge 4 commits into
Part-DB:masterfrom
d-buchmann:advanced-search-squashed

Conversation

@d-buchmann

@d-buchmann d-buchmann commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Supersedes PR #944
Nota bene: Test were generated using AI. The actual code is handwritten.

Up to 5 individual tokens (separated by spaces) can be given as search string. Each token is individually searched for in all selected fields.

Examples (assuming the relevant fields are selected for search):

  • a part named foo with a tag bar will be found with the search string "foo bar".
  • a part named bar baz will be found with the search string "baz bar".
  • A capacitor named MLCC 100nF, Manufacturer Kemet, Footprint 0603 will be found with any combination of the 4 keywords in any order.

All above examples don't yield these results in the current search implementation.
While the filter would be the more efficient tool to achieve the same results, some users might not be familiar with this - but quite possibly with a search bar.

Added SearchSettings which has 3 items:

Up to 5 individual tokens (separated by spaces) can be given as search string.
Each token is individually searched for in all selected fields.

Examples (assuming the relevant fields are selected for search):
- a part named `foo` with a tag `bar` will be found with the search string "foo bar".
- a part named `bar baz` will be found with the search string "baz bar".
- a part with the ID 123 and in storage location `a_qux_b` will be found with the search string "qux 123".
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.17647% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.45%. Comparing base (57a0dfd) to head (3702c07).

Files with missing lines Patch % Lines
src/DataTables/Filters/PartSearchFilter.php 90.90% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1406      +/-   ##
============================================
+ Coverage     58.44%   58.45%   +0.01%     
- Complexity     8667     8671       +4     
============================================
  Files           634      634              
  Lines         27991    28009      +18     
============================================
+ Hits          16359    16374      +15     
- Misses        11632    11635       +3     

☔ View full report in Codecov by Harness.
📢 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.

These were created with the help of GPT-5.2.
Disclaimer: I don't have the experience to judge the quality or validity of the results.
@d-buchmann d-buchmann force-pushed the advanced-search-squashed branch from 8f1f10c to c21c6fe Compare June 9, 2026 06:27
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.

1 participant