Search, space and multiple fields : The story of a search engine
Say my model has :
- a first name : Alberto
- a last name : Guterès
He is from Mexico, he is a little overweighted, wears a sombrero and have sweating patches at his armpits.
Now say I have the following sib-display
:
<sib-display
search-fields="name"
set-name="first_name, last_name"
></sib-display>
If I type :
- Alterto : it works !
- Guteres : it works !
- Alterto Guteres : it doesn't work..
The space is not handled between fields. I believe it should behave this way :
Pseudo code :
- Hello, I am the search engine
- Oh, here is the query
Alberto Guteres
- I split you up by
var queryStrings = ["Alberto", "Guteres"]
- If
first_name +" "+ last_name
contains all the strings withinqueryStrings
: it is a match !
Not having this feature makes Alterto really sad :