sphinx以mysql为数据源建索引失败
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了sphinx以mysql为数据源建索引失败,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2325字,纯文字阅读大概需要4分钟。
内容图文
这是sphinx.conf 的内容source src1
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = 1goodlusslulU
sql_db = fangxinjia_sku
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
# sql_query_pre = SET SESSION query_cache_type=OFF
sql_query = SELECT product_attribute_id,product_name FROM product_attribute
sql_attr_uint = product_attribute_id
sql_attr_string = product_name
}
这是我建立索引的命令 /usr/local/sphinx/bin/indexer --config /usr/local/sphinx/etc/sphinx.conf --all
执行完 一直是这个结果,
Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/usr/local/sphinx/etc/sphinx.conf'...
skipping non-plain index 'product_attribute'...
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
求教有什么问题,感谢
mysql库中有文件,索引执行命运也没有报错,但就是没数据
回复内容:
这是sphinx.conf 的内容
source src1
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = 1goodlusslulU
sql_db = fangxinjia_sku
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
# sql_query_pre = SET SESSION query_cache_type=OFF
sql_query = SELECT product_attribute_id,product_name FROM product_attribute
sql_attr_uint = product_attribute_id
sql_attr_string = product_name
}
这是我建立索引的命令 /usr/local/sphinx/bin/indexer --config /usr/local/sphinx/etc/sphinx.conf --all
执行完 一直是这个结果,
Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/usr/local/sphinx/etc/sphinx.conf'...
skipping non-plain index 'product_attribute'...
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
求教有什么问题,感谢
mysql库中有文件,索引执行命运也没有报错,但就是没数据
没有配置index
index src1 {
source src1;
…
}
内容总结
以上是互联网集市为您收集整理的sphinx以mysql为数据源建索引失败全部内容,希望文章能够帮你解决sphinx以mysql为数据源建索引失败所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。