狮身人面像。一组查询。 PHP API
几乎没有狮身人面像的迹象。 我有5页。一方面应该看看整个基地。 接下来将完成此操作。配置:
source logs
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass =
sql_db = bot
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query = SELECT * FROM logs
sql_attr_uint = host
sql_query_info = SELECT * FROM logs WHERE id=$id
}
index logs
{
source = logs
path = D:\Webserver/Sphinx/index/logs
morphology = stem_ru, stem_en
min_word_len = 1
charset_type = utf-8
}
searchd
{
listen = 9312
log = D:\Webserver/Sphinx/log/searchd.log
query_log = D:\Webserver/Sphinx/log/query.log
pid_file = D:\Webserver/Sphinx/log/searchd.pid
}
现在我需要以某种方式进行数据库搜索,其中 postid = 特定值。 仍然需要在配置中输入某些内容吗?在 php 文件上写什么来显示不同的搜索,而不是整个数据库? 我希望解释清楚:) 谢谢 抱歉英语不好
With little sign of the Sphinx.
I have 5 pages. At one should look at the entire base.
This is done next. config:
source logs
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass =
sql_db = bot
sql_port = 3306
sql_query_pre = SET NAMES utf8
sql_query = SELECT * FROM logs
sql_attr_uint = host
sql_query_info = SELECT * FROM logs WHERE id=$id
}
index logs
{
source = logs
path = D:\Webserver/Sphinx/index/logs
morphology = stem_ru, stem_en
min_word_len = 1
charset_type = utf-8
}
searchd
{
listen = 9312
log = D:\Webserver/Sphinx/log/searchd.log
query_log = D:\Webserver/Sphinx/log/query.log
pid_file = D:\Webserver/Sphinx/log/searchd.pid
}
Now I need to somehow make a database search where postid = a specific value.
Something enter in the config still necessary? And what to write on the php file to display a different search, but not entire database?
I hope it is clear explained:) Thanks
SORRY FOR BAD ENGLISH
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要阅读 Sphinx API 文档,并连接到您的 <代码>searchd 与此。设置起来相当简单,但如果您有疑问,请发表评论。
You'll need to read over the Sphinx API documents, and connect to your
searchd
with that. It's fairly trivial to set up, but leave a comment if you have questions.