开发者

Sphinx. Set of queries. PHP API

开发者 https://www.devze.com 2023-01-21 03:44 出处:网络
With little sign of the Sphinx. I have 5 pages. At one should look at the entire base. This is done next. config:

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 dat开发者_如何学运维abase 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消