Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Relevance is not accurate in boolean mode #99

Open
abibby opened this issue May 7, 2020 · 0 comments
Open

Relevance is not accurate in boolean mode #99

abibby opened this issue May 7, 2020 · 0 comments

Comments

@abibby
Copy link

abibby commented May 7, 2020

When you are using boolean mode to search the relevance uses natural language mode.

I think the issue is in src/Engines/Modes/Boolean.php

 public function buildSelectColumns(Builder $builder)
 {
     $indexFields = implode(',',  $this->modelService->setModel($builder->model)->getFullTextIndexFields());
 
-    return "*, MATCH($indexFields) AGAINST(? IN NATURAL LANGUAGE MODE) AS relevance";
+    return "*, MATCH($indexFields) AGAINST(? IN BOOLEAN MODE) AS relevance";
 }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant