So i have a model that im indexing and should be searchable by a description column and a uuid. Ive indexed the models with
php artisan tntsearch:import...
My endpoint returns search results when i search by description. However with an exact search using the uuid string i hit an issue.
Ive read that if i wanted to a an exact search i should enable searchBoolean to true in my .env. When i do this and do an exact search by the full uuid i get an exception invalid argument suplied to foreach(). Which occurs in TeamTNT\TNTSearch\Support class on line 50 in the filter method where it tries to loop over $this->items. When i dump $this->items it is showing the first segment of the uuid im trying to search.
Oddly enough if i try to search using a partial string of the uuid instead of the full uuid(with or without search boolean enabled), it simply returns no results and does not error out. Are the uuid's not being indexed correctly? Am i missing something?
So i have a model that im indexing and should be searchable by a
description
column and auuid
. Ive indexed the models withphp artisan tntsearch:import...
My endpoint returns search results when i search by
description
. However with an exact search using the uuid string i hit an issue.Ive read that if i wanted to a an exact search i should enable
searchBoolean
to true in my.env
. When i do this and do an exact search by the full uuid i get an exceptioninvalid argument suplied to foreach()
. Which occurs inTeamTNT\TNTSearch\Support
class on line 50 in thefilter
method where it tries to loop over$this->items
. When i dump$this->items
it is showing the first segment of the uuid im trying to search.Ex:
/endpoint?q=e07ac90d-a7e9-37d0-90a6-08992e9ebb9d
The dump is
e07ac90d
Oddly enough if i try to search using a partial string of the uuid instead of the full uuid(with or without search boolean enabled), it simply returns no results and does not error out. Are the uuid's not being indexed correctly? Am i missing something?
"teamtnt/laravel-scout-tntsearch-driver": "^3.0"