More liveSearchStyle Option: containsAllWords #2649
josh-at-fieldsresearch
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, liveSearchStyle has two options.
contains: contains exact phrase, case insensitive
startsWith: starts with exact phrase, case insensitive
The project we are working has had demands increased to have this option
'containsAllWords'
In short, it would take the phrase entered by the user and explode it on spaces. Then it would look for things that contain all of the words.
Specifically there is a large list of products in a format often like this
[MODEL] [SIZE] [ATTRIBUTES] [PRODUCT TYPE]
Model would have things like QG-65, QG-80, etc
Attributes would have things like: ROUND, SQUARE, SMOOTH, SERRATED
Ideally what would happen is that the end-user would search for
QG-80 SQUARE. And it would bring up options that include both "QG-80" and "SQUARE".
I have included an updated stringSearch as an example of we accomplished it.
Beta Was this translation helpful? Give feedback.
All reactions