谁能帮我?当我尝试将数据导入elasticsearch时,出现以下错误。使用的数据库是Oracle。
在执行此操作时:
php artisan scout:import "Amp\XIP\LineSearch
我在下面收到此错误:
Illuminate\Database\QueryException : ORA-01741: illegal zero-length identifier (SQL: select t2.* from ( select rownum AS "rn", t1.* from (select * from "SA"."TABLE_X_SEARCH_CUSTOMER" order by "" asc) t1 ) t2 where t2."rn" between 1 and 500)
at /Users/amp/Sites/amp3/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 Yajra\Pdo\Oci8\Exceptions\Oci8Exception::("ORA-01741: illegal zero-length identifier")
/Users/amp/Sites/amp3/vendor/yajra/laravel-pdo-via-oci8/src/Pdo/Oci8.php:122
2 Yajra\Pdo\Oci8::prepare("select t2.* from ( select rownum AS "rn", t1.* from (select * from "SA"."TABLE_X_SEARCH_CUSTOMER" order by "" asc) t1 ) t2 where t2."rn" between 1 and 500")
/Users/amp/Sites/amp3/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326
我正在使用这个包https://github.com/babenkoivan/scout-elasticsearch-driver
最佳答案
您不能通过以下方式使用订单:通过“” 进行订单
而不是使用按空排序
关于laravel - 使用Oracle将数据导入laravel中的Elasticsearch的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58711561/