繁体   English   中英

使用Oracle在laravel中导入数据到elasticsearch的问题

[英]Problem of importing data to elasticsearch in laravel using Oracle

谁能帮我? 当我尝试将数据导入 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

我正在使用这个 package https://github.com/babenkoivan/scout-elasticsearch-driver

你不能像这样使用 order by: order by ""

而不是null 的使用顺序

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM