Hello all! I'm trying TypeSense out as an alternat...
# community-help
t
Hello all! I'm trying TypeSense out as an alternative to what we're currently using, Algolia. One thing we use Algolia for is advanced employee search and one of the really intuitive things about Algolia is that using the
prefixAll
setting we're able to search for employees using common nicknames or shortened versions of names, for example when searching for an employee named "benjamin johnson", it is common for people to search "ben johnson" because that is what they know the person as. This works well in Algolia and doesn't return other irrelevant results such as other people with the last name "johnson" or the first name "ben". I'm having trouble achieving a similar result in TypeSense without also returning lots of irrelevant results or having other results match higher. Any initial thoughts?
Just as another example, you could search "andy jones" in order to return "anderson jones" in our Algolia index. But also having trouble matching this behavior in TypeSense without returning lots of irrelevant results, which wouldn't be a problem if not for the fact that "anderson jones" is ranked pretty low.
j
@Timothy Smith Typesense currently only does a prefix search on the last word in a set of words in a search query. This exact name search use case came up recently for another user as well. Could you open a GitHub feature request for this, so we can track demand?
Until then, one hack could be to intercept the query users are typing in and swap the order of the words, so the current last-word prefix-search approach fetches results. So for eg, if someone types in “ben johnson”, do a search for that and also “johnson ben”
t
Ah, very interesting solution. I'll give that a try and I'll definitely be opening a Github feature request. I appreciate the guidance @Jason Bosco!
👍 1