PC端产品搜索报错“MongoDB Exception – yii\mongodb\Exception text index required for $text query”或者 “text index required for $text query (no such collection 'fecshop.full_search_product_en')”

bug问题 · zhensong1 · 于 5年前 发布 · 3724 次阅读

我都是开启了mongoSearch,关闭了xunSearch搜索引擎。但是在window环境里搜索后报错,如图: 线上环境也是搜索就报错,如图: 如果线上切换到中文就没报错但是搜索不到商品(后台有商品),我切到英文就报上面的错 请问这是什么原因造成的!

共收到 8 条回复
Terry#15年前 0 个赞

您没有跑搜索脚本,需要跑脚本初始化 Mongodb full search index

这个部分在安装文档有这个步骤,你没有操作:

文档:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-config.html

10.3产品搜索 部分

操作一下就可以了,win下面跑shell,好像也可以,需要安装个啥东西,忘记了

zhensong1#25年前 0 个赞

明白,谢谢

windows用不了xunSearch怎么整?

Terry#45年前 0 个赞

@cyx_20180320 #3楼 线上都是用linux的,本地win开发你可以用mongodb的full text。

线上打开配置即可,xunsearch就是这么个玩意,只支持linux

coolhector#55年前 0 个赞

@Terry [#1楼](#comment1) 英文搜索也需要开启 xunsearch ? 我用 英文搜索 也是报这一堆错误。

Fecmall#65年前 0 个赞

@coolhector #5楼 上面的回复已经说明问题如何解决了

coolhector#75年前 0 个赞

@Fecshop #6楼 跑脚本 cd 到 vendor/fancyecommerce/fecshop/shell/search 该目录后, sh fullSearchSync.sh 报错

Exception 'Error' with message 'Class 'MongoDB\Driver\BulkWrite' not found'
in ~/projects/yii2_fecshop_docker/app/fecshop/vendor/yiisoft/yii2-mongodb/src/Command.php:219
Fecmall#85年前 0 个赞

docker安装的也会出这个错误?是不是安装过程中某些扩展安装失败了?

你是第一次提这个报错

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics