簡體   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