You are talking about fuzzy search I guess.
https://www.basedash.com/blog/mysql-fuzzy-search-an-overview
Hello everyone,
I'm facing a problem how can I get all the similar or related questions from db.
$question = "What is HTML?";
$results = DB::table('questions')
->select('question')
->whereRaw(
"MATCH(question) AGAINST(? IN NATURAL LANGUAGE MODE)",
[$question]
)
->get();
foreach ($results as $result) {
echo $result->question;
}
I tried this code, but I want to go over every question—not just the one that was provided.
Please or to participate in this conversation.