yabhq / laravel-scout-mysql-driver

Laravel Scout MySQL Driver
MIT License
522 stars 111 forks source link

Inf and NaN cannot be JSON encoded #118

Open safiullahsarhandi opened 3 years ago

safiullahsarhandi commented 3 years ago

Hello this issue im facing while searching on json column

relevance is returning INF may be this is an issue. any solution would be appreciated.

safiullahsarhandi commented 3 years ago

made it worked like this

$results = Application::search(request('q'))->get()->map(function($item){ unset($item['relevance']); return $item; });