wangzhoudong / laravel-opensearch Goto Github PK
View Code? Open in Web Editor NEW基于laravel scout的opensearch搜索扩展
License: MIT License
基于laravel scout的opensearch搜索扩展
License: MIT License
配置完成后,查询并未从 openSearch 中查询,还是查询的mysql 请问是什么原因呢,查询方式
Model::search('搜索关键字')->get()
执行以上查询,不会从阿里云的opensearch中搜索 请问一下作者是我还需要配置什么吗?
root@66d94be5f6c7:/var/www/sanvu-project/sanvu-api# php artisan scout:flush "App\Models\QQ"
ErrorException : Undefined property: stdClass::$data_type
at /var/www/sanvu-project/sanvu-api/vendor/opensearch/laravel-opensearch/src/OpenSearchEngine.php:343
339| $structure = \DB::select('select column_name as `name`,data_type from information_schema.columns where table_schema = :table_schema AND table_name = :table_name;', ['table_schema' => $tableSchema, 'table_name' => $tableName]);
340| $fields = [];
341| foreach ($structure as $item) {
342| $item->primary_key = strtolower($keyName) == strtolower($item->name);
> 343| $item->type = getDataType($item->data_type);
344| unset($item->data_type);
345| $fields[$item->name] = $item;
346| }
347|
Exception trace:
1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined property: stdClass::$data_type", "/var/www/sanvu-project/sanvu-api/vendor/opensearch/laravel-opensearch/src/OpenSearchEngine.php")
/var/www/sanvu-project/sanvu-api/vendor/opensearch/laravel-opensearch/src/OpenSearchEngine.php:343
2 Wangzd\OpenSearch\OpenSearchEngine::getSchemaTableFields(Object(App\Models\QQ))
/var/www/sanvu-project/sanvu-api/vendor/opensearch/laravel-opensearch/src/OpenSearchEngine.php:259
Please use the argument -v to see more details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.