laravel - 使用Oracle将数据导入laravel中的Elasticsearch的问题

标签 laravel oracle elasticsearch laravel-scout

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

相关文章:

elasticsearch - elasticsearch搜索字段的第n个字符与参数匹配的位置

php - 如何用mysql转义引号内的反斜杠

mysql - 将 CodeIgniter 查询转换为 Laravel 查询

oracle - 无法打开服务 <OracleOraDb10g_home1TNSListener>,错误 1060

oracle - 对 View 使用提示?

java - 在 Elasticsearch 中查询以返回给定短语的所有结果

javascript - Laravel 多页面 View 和 session

php - 使用 Controller 下载 Laravel Excel

sql - 在 Oracle 中使用单个语句在表之间移动行

python-3.x - 删除elasticsearch中的索引