File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ In your `config/scout.php` add:
48
48
'max_expansions' => 50,
49
49
'distance' => 2
50
50
],
51
+ 'asYouType' => false,
51
52
],
52
53
```
53
54
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public function boot()
25
25
$ tnt ->loadConfig ($ config );
26
26
$ tnt ->setDatabaseHandle (app ('db ' )->connection ()->getPdo ());
27
27
$ this ->setFuzziness ($ tnt );
28
+ $ this ->setAsYouType ($ tnt );
28
29
29
30
return new Engines \TNTSearchEngine ($ tnt );
30
31
});
@@ -49,4 +50,11 @@ private function setFuzziness($tnt)
49
50
$ tnt ->fuzzy_max_expansions = isset ($ max_expansions ) ? $ max_expansions : $ tnt ->fuzzy_max_expansions ;
50
51
$ tnt ->fuzzy_distance = isset ($ distance ) ? $ distance : $ tnt ->fuzzy_distance ;
51
52
}
53
+
54
+ private function setAsYouType ($ tnt )
55
+ {
56
+ $ asYouType = config ('scout.tntsearch.asYouType ' );
57
+
58
+ $ tnt ->asYouType = isset ($ asYouType ) ? $ asYouType : $ tnt ->asYouType ;
59
+ }
52
60
}
You can’t perform that action at this time.
0 commit comments