On Modrinth, users often want to search by a parti...
# community-help
j
On Modrinth, users often want to search by a partial (prefix) text match, for example "just en" to search for the mod Just Enough items, or "immersive en" to search for Immersive Engineering. As I understand, Typesense's defaults are tuned more for keyword searches, e.g. searching for "wireless headphones bluetooth" will bring up results for "Bluetooth headphones for wireless calls" - the user's query has the same words, but they're not in the same order. We want to make projects with an exact prefix match (like "just en") score at the absolute top of search, above all other metrics. Currently, it seems like Typesense is treating each word in the query as equal weighting - so for example, searching "just en" -> the word "en" matches tons of other, more popular projects like "Entity Texture Features" or "Too Many Entities"; this goes against our desired behaviour. It also seems that, even though the title has weight 15 and summary has weight 1, if an "en" appears in the summary, then it gets weight disproportinately higher than what it should be.
j
Hi Josh. This seem similar to your previous query, I struggled to reproduce this behavior by constructing local examples. Are you hosting on Typesense Cloud? This would allow us to look at your collection's schema & data to provide better advice. Alternatively if you could DM me a cURL example that would let us debug this ourselves against your cluster, to find the right parameters to use.
j
No we are self hosting
Is there something else I can provide?
j
A copy of your schema would also help so we can see how each field is configured (I assume you'd want to DM that too). But the most helpful would be the cURL example. I've tried constructing examples to simulate your issue but they all get fixed by setting
prioritize_token_position: true
and
drop_tokens_threshold: 0
, which you previously said didn't work for you.
\