Comments (4)
In my case, I was trying to search for only deleted models. This worked for me:
Model::search($text, function ($query) { return $query->onlyTrashed(); });
I am trying to query onlyTrashed models but this solution did not work for me - I still get the same error as OP.
I have changed the 'soft_delete' boolean to 'true' in app/scout.php
, and flushed & re-indexed using php artisan scout
.
Anything else to try here?
from laravel-scout-mysql-driver.
In my case, I was trying to search for only deleted models. This worked for me:
Model::search($text, function ($query) { return $query->onlyTrashed(); });
This pushed me in the right direction; I'm running this:
MyModel::search($text, function ($query) {
return $query->onlyTrashed();
})->get();
While having the 'soft_delete' boolean set to 'false' in app/scout.php
- it didn't work with this boolean set to true as I would then run into the error mentioned at the top of this issue.
from laravel-scout-mysql-driver.
In my case, I was trying to search for only deleted models. This worked for me:
Model::search($text, function ($query) {
return $query->onlyTrashed();
});
from laravel-scout-mysql-driver.
In my case, I was trying to search for only deleted models. This worked for me:
Model::search($text, function ($query) { return $query->onlyTrashed(); });
This pushed me in the right direction; I'm running this:
MyModel::search($text, function ($query) { return $query->onlyTrashed(); })->get();
While having the 'soft_delete' boolean set to 'false' in
app/scout.php
- it didn't work with this boolean set to true as I would then run into the error mentioned at the top of this issue.
Thanks, work also for me with callback in search method and config boolean set to false.
from laravel-scout-mysql-driver.
Related Issues (20)
- Exception with Queue Exception: Please install the Algolia client: algolia/algoliasearch-client-php. in vendor/laravel/scout/src/EngineManager.php:59 HOT 1
- Callback method for modifying the db query not working
- How to exclude columns from the search?
- Search doesn't work with `with` or `load` HOT 2
- Class 'Yab\MySQLScout\Engines\Modes\' not found HOT 1
- Cache full text index fields HOT 2
- Query expansion not used in select columns
- Laravel 8 support HOT 3
- Question: highlight helper function
- Change "NATURAL LANGUAGE" search mode for models with unsupported columns like "int" HOT 1
- Inf and NaN cannot be JSON encoded HOT 1
- Laravel scout v9 support HOT 4
- Fallback not worked
- Emojis
- Laravel 9 Support
- Class 'Yab\MySQLScout\Engines\Modes\' not found
- Scout 10 Support HOT 1
- Indexing & Searching Relationships HOT 2
- Search does't work with WHERE HOT 9
- Relevance is not accurate in boolean mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-scout-mysql-driver.