Feature Request: Allow Prefix Search on All Tokens
Feature Request
Hello! I would like to request the ability to do prefix searching on all tokens, similar to what Algolia provides with https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/#querytypeprefixall
Use Case
My real world use case is similar to what Algolia mentions in the doc above:
If users are searching in a domain where many words are commonly shortened, prefixAll could be suitable - for example, “spec review” instead of “specification review.”
My use case is employee search. In the internal applications we build at my company, it is common to provide an employee search feature. When people search for employees, they tend to use their "nicknames" or common shortened versions of peoples names, some examples being:
- Search "ben johnson" to find the employee who is legally named "benjamin johnson"
- Search "andy jones" to find the employee who is legally named "anderson jones"
Currently, achieving something similar in Typesense is proving to be difficult without some unintuitive combination of search parameters or without returning several irrelevant results.
In the community Slack channel, I received a recommendation to reverse the order of the words before actually performing the search, which actually does provide the results I'm looking for, however that feels like a fragile solution that likely has some pitfalls to it. Even if that isn't the case, requiring that the frontend of an application take the extra step of reversing the searched words definitely makes it a little less "works out of the box".
Hi! Personally this would be a great feature for my team's project. We are currently working in the search feature for a global network of entrepreneurs & mentors.
In some cases you would search for someone by nickname or a shortened version of the name like Chris (for Christopher) Schmidt, and the current results would return all the results for Chris, for example Chris Thompson, Chris Williams and would not retrieve the expected Christopher Schmidt at first result.
Thanks for the awesome work! 🏎️
Also a need for us in customer search (names that can be copy pasted) or e-commerce search (where plurals on multiple words often give deceptive results, e.g. different results for "sock men", "men socks", "socks men", "man socks"...).
+1 please! I am building sports tournament software and when we search for players. "Jeff Baker" does not return a document that contains { firstName: "Jeffrey", lastName: "Baker" } unless I reverse the order.
+1 we are searching job listings for job title and required skills, and need to return any results that contain a token provided in our query from either attributes
Reading v28 changelog, it seems that stemming on custom dictionnaries could solve some of the usecases here (not names, but at least plurals) https://github.com/typesense/typesense/pull/2062 ?