I have came up with this new use case that could be added to the search.
While using the search I am often looking for something that exactly matches the word I input.
However when for example looking for test, if an article had tester in it, it would come up too which is okay.
So I thought, if you're looking for test only you would do like auto-complete and add a space at then end to specify that the word your looking for is just test, the extra space meaning it shouldn't match tester.
The same if you are looking for hello world and you find results for hello amazing world, by adding a space at the end, you mean that you are looking for the exact match like hello world won't return hello amazing world only articles with hello world in it.
Here would be my implementation of it for the literal search. I have added some test cases so you can see how it works.
Let me know what you think, I could add a note in the documentation if needed.
Hi @christian-fei
I have came up with this new use case that could be added to the search. While using the search I am often looking for something that exactly matches the word I input.
However when for example looking for
test
, if an article hadtester
in it, it would come up too which is okay. So I thought, if you're looking fortest
only you would do like auto-complete and add a space at then end to specify that the word your looking for is justtest
, the extra space meaning it shouldn't matchtester
.The same if you are looking for
hello world
and you find results forhello amazing world
, by adding a space at the end, you mean that you are looking for the exact match likehello world
won't returnhello amazing world
only articles withhello world
in it.Here would be my implementation of it for the literal search. I have added some test cases so you can see how it works. Let me know what you think, I could add a note in the documentation if needed.