ftiersch's avatar

RankingScoreThreshold with Scout and Meilisearch

Hey guys,

I've implemented Scout with Meilisearch in a project and in general it works well. The problem is it shows ALL the results that are even slightly connected to the search term and for the life of me I cannot figure out how to set the rankingScoreThreshold property for the search in order to get better search results.

Any help would be very appreciated :) Thank you!

0 likes
1 reply
ftiersch's avatar
ftiersch
OP
Best Answer
Level 28

Alright, of course just after posting this (and doing an additional 30min of code diving) I found the solution... In hindsight quite obvious...

Post::search('best stuff')->options([
		'rankingScoreThreshold' => 0.9,
])->get();

Please or to participate in this conversation.