Implement advanced search#1406
Conversation
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 Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1406 +/- ##
============================================
+ Coverage 58.44% 58.49% +0.05%
- Complexity 8667 8687 +20
============================================
Files 634 637 +3
Lines 27991 28070 +79
============================================
+ Hits 16359 16420 +61
- Misses 11632 11650 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8f1f10c to
c21c6fe
Compare
|
I took a rough look:
|
ac1e6ed to
7d1738f
Compare
7d1738f to
2a1c985
Compare
|
You're right about the user configurability, that way it can adapt to the varying user preferences much better. Meanwhile One more aspect I haven't yet solved is that regex and extensive search are mutually exclusive in the PHP code, but not in the user interface. It works, but if regex is enabled, the other two options will be silently ignored. |
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):
foowith a tagbarwill be found with the search string "foo bar".bar bazwill be found with the search string "baz bar".MLCC 100nF, ManufacturerKemet, Footprint0603will 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: