Coder Social home page Coder Social logo

laravel-opensearch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laravel-opensearch's Issues

请教一个问题

配置完成后,查询并未从 openSearch 中查询,还是查询的mysql 请问是什么原因呢,查询方式

Model::search('搜索关键字')->get()

执行以上查询,不会从阿里云的opensearch中搜索 请问一下作者是我还需要配置什么吗?

执行 php artisan scout:flush 报如下错误,请问作者这是什么原因呢

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.