centos环境 Xunsearch安装了,Xunsearch也开启了,搜索还是显示没有任何结果,请问到底哪里错了呢?

技术问题 · happysunzone · 于 5年前 发布 · 2532 次阅读

centos环境 Xunsearch安装了,Xunsearch也开启了,搜索还是显示没有任何结果,请问到底哪里错了呢?




需需要跑数据同步脚本:http://www.fecshop.com/doc/fecshop-guide/instructions/cn-1.0/guide-fecshop_search.html

 search]# sh ./fullSearchSync.sh
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
There are  products to process
There are  pages to process
##############ALL BEGINING###############
./fullSearchSync.sh: line 17: ((: i<=: syntax error: operand expected (error token is "<=")
: No such file or directory
##############ALL COMPLETE###############
[root@izm5e0cx0jnf0apy3tctgvz search]# sh ./fullSearchSync.sh
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
There are  products to process
There are  pages to process
##############ALL BEGINING###############
./fullSearchSync.sh: line 17: ((: i<=: syntax error: operand expected (error token is "<=")
: No such file or directory
##############ALL COMPLETE###############




1.确定文件路径正确,看你的应该是正确的

2.执行下这个命令

dpkg-reconfigure dash

然后填写no

3.然后跑试试


[root@izm5e0z search]# dpkg-reconfigure dash
-bash: dpkg-reconfigure: command not found
[root@izm5e0zz search]# pwd
/www/wwwroot/tomshop/vendor/fancyecommerce/fecshop/shell/search
[root@izm5e0cx0jnf0apy3tctgvz search]# 



#!/bin/sh
Cur_Dir=$(cd `dirname $0`; pwd)
# init  full search collection indexes.
$Cur_Dir/../../../../../yii  product/search/initindex
# get now update timestamp.
nowtime=`$Cur_Dir/../../../../../yii  product/search/nowtime`

###### 1.Sync Section : Sync Product  Serach Collection
# get product all count.
count=`$Cur_Dir/../../../../../yii product/search/synccount`
pagenum=`$Cur_Dir/../../../../../yii product/search/syncpagenum`


echo "There are $count products to process"
echo "There are $pagenum pages to process"
echo "##############ALL BEGINING###############";
for (( i=1; i<=$pagenum; i++ ))
do
   $Cur_Dir/../../../../../yii product/search/syncdata $i
   echo "Page $i done"
done
# ()delete all search data that sync_updated_at $gt $nowtime.
$Cur_Dir/../../../../../yii  product/search/deletenotactiveproduct $nowtime

echo "##############ALL COMPLETE###############";
为什么报错 No such file or directory? 你的fecshop的根目录,是不是没有 yii 这个文件?

你安装的时候没有执行 ./init吧? 执行这个需要给这个文件 ./init加755权限 , 然后执行才会生效。

安装的时候,不要只知道一味的复制粘贴,要看命令行的执行结果。



[root@izm5e0cx0 tomshop]# .yii
-bash: .yii: command not found
[root@izm5e0cx0 tomshop]# pwd
/www/wwwroot/tomshop
[root@izm5e0cx0jnf0apy3tctgvz tomshop]# 

./yii也执行 不了?




1.search.ini文件不要做改动

2.如果是手动安装(非docker安装),需要添加一下hosts,参考:http://www.fecshop.com/topic/615 ,docker安装不需要添加

3.我猜,你是执行了./init,但是这个文件默认没有执行权限,你没看看结果直接跳过了,导致没有执行。

本文由 happysunzone 创作,采用 知识共享署名 3.0 中国大陆许可协议 进行许可。 可自由转载、引用,但需署名作者且注明文章出处。

共收到 17 条回复
 search]# sh ./fullSearchSync.sh
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
There are  products to process
There are  pages to process
##############ALL BEGINING###############
./fullSearchSync.sh: line 17: ((: i<=: syntax error: operand expected (error token is "<=")
: No such file or directory
##############ALL COMPLETE###############
[root@izm5e0cx0jnf0apy3tctgvz search]# sh ./fullSearchSync.sh
: No such file or directory
: No such file or directory
: No such file or directory
: No such file or directory
There are  products to process
There are  pages to process
##############ALL BEGINING###############
./fullSearchSync.sh: line 17: ((: i<=: syntax error: operand expected (error token is "<=")
: No such file or directory
##############ALL COMPLETE###############

执行没有返回数据哦

Fecmall#45年前 0 个赞

@happysunzone #3楼

1.确定文件路径正确,看你的应该是正确的

2.执行下这个命令

dpkg-reconfigure dash

然后填写no

3.然后跑试试

[root@izm5e0z search]# dpkg-reconfigure dash
-bash: dpkg-reconfigure: command not found
[root@izm5e0zz search]# pwd
/www/wwwroot/tomshop/vendor/fancyecommerce/fecshop/shell/search
[root@izm5e0cx0jnf0apy3tctgvz search]# 

系统版本 CentOS Linux release 7.4.1708 (Core) 64位

Fecmall#75年前 0 个赞
#!/bin/sh
Cur_Dir=$(cd `dirname $0`; pwd)
# init  full search collection indexes.
$Cur_Dir/../../../../../yii  product/search/initindex
# get now update timestamp.
nowtime=`$Cur_Dir/../../../../../yii  product/search/nowtime`

###### 1.Sync Section : Sync Product  Serach Collection
# get product all count.
count=`$Cur_Dir/../../../../../yii product/search/synccount`
pagenum=`$Cur_Dir/../../../../../yii product/search/syncpagenum`


echo "There are $count products to process"
echo "There are $pagenum pages to process"
echo "##############ALL BEGINING###############";
for (( i=1; i<=$pagenum; i++ ))
do
   $Cur_Dir/../../../../../yii product/search/syncdata $i
   echo "Page $i done"
done
# ()delete all search data that sync_updated_at $gt $nowtime.
$Cur_Dir/../../../../../yii  product/search/deletenotactiveproduct $nowtime

echo "##############ALL COMPLETE###############";

为什么报错 No such file or directory? 你的fecshop的根目录,是不是没有 yii 这个文件?

你安装的时候没有执行 ./init吧? 执行这个需要给这个文件 ./init加755权限 , 然后执行才会生效。

安装的时候,不要只知道一味的复制粘贴,要看命令行的执行结果。

[root@izm5e0cx0 tomshop]# .yii
-bash: .yii: command not found
[root@izm5e0cx0 tomshop]# pwd
/www/wwwroot/tomshop
[root@izm5e0cx0jnf0apy3tctgvz tomshop]# 

.yii也执行 不了?

tomshop]# ./init : No such file or directory

Fecmall#105年前 0 个赞

./yii

基础好差。

知道用./yii

刚才打错了 tomshop]# ./yii : No such file or directory

嗯 安装的时候直接本地上传服务器的 没有执行 ./init

Fecmall#145年前 0 个赞

1.search.ini文件不要做改动

2.如果是手动安装(非docker安装),需要添加一下hosts,参考:http://www.fecshop.com/topic/615 ,docker安装不需要添加

3.我猜,你是执行了./init,但是这个文件默认没有执行权限,你没看看结果直接跳过了,导致没有执行。

Fecmall#155年前 0 个赞

您把您的错误信息,整理到帖子内容里面把,错误贴到title里面

现在的搜索只针对帖子内容本身,评论部分不在搜索的范围内。

好的

这个问题自己摸索已经解决了

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