Hi We're seeing some unexpected behaviour on some ...
# community-help
j
Hi We're seeing some unexpected behaviour on some phrase searches. Dataset includes data like:
Copy code
{
  "prop1": "1234567890",
  "prop2": "foo"
},
{
  "prop1": "123409876",
  "prop2": "foo"
}
So many items where "prop1" is the same, so "1234" will prefix hit a lot of them. Searching for "1234" alone gets a lot of hits, but searching for "1234 foo" gives a lot fewer. Anyone have an explanation to this?
y
typesense is doing prefix search only on the last word. It considers n-1 last words as exact search You can use infix search to solve that but IIRC, there are some memory/performance tradeoffs
➕ 1
j
Thanks, that makes perfectly sense with the results we're seeing