Sphinx matching Problem

Source: Internet
Author: User
Configuration seems to be no problem, the command line can get matching results, but introduced into PHP but no results, using Coreseek.
Today just learned Sphinx, I do not know where the problem, the Internet did not encounter similar problems:
Here is the configuration file:
#MySQL数据源配置, for more information, see: http://www.coreseek.cn/products-install/mysql/#请先将var/test/ Documents.sql Import the database and configure the following MySQL user password database # source definition cetsix{type = mysql Sql_host = l Ocalhost Sql_user = root Sql_pass = cai123 sql_db = Words sql_p  ORT = 3306 Sql_query_pre = SET NAMES utf8sql_query = SELECT id, meaning, lx from Cetsix} #index定义index cetsix{Source = cetsix #对应的source名称 Path = E:\CodeEdit\ph P\ciba\niujin-alpha\sphinx\var\data\cetsix DocInfo = extern Mlock = 0 morphology = n    One Min_word_len = 1 Html_strip = 0 Charset_dictpath = E:\CodeEdit\php\ciba\niujin-alpha\sphinx\etc Charset_type = utf-8}indexer{Mem_limit = 128M} #searchd服务定义searchd {listen = 33 Read_timeout = 5 Max_children = MAX_MATChes = Seamless_rotate = 1 preopen_indexes = 0 Unlink_old = Maximum allowable filter Number of max_filters = #每个过滤器最大允许的值的个数 max_filter_values = 4096# log file save path Pid_file = E:\CodeEdit\php\ciba \niujin-alpha\sphinx\var\log\searchd_mysql.pid log = E:\CodeEdit\php\ciba\niujin-alpha\sphinx\var\log\searchd_ Mysql.log query_log = E:\CodeEdit\php\ciba\niujin-alpha\sphinx\var\log\query_mysql.log}


Here is the PHP test code:
 
  Setserver ("127.0.0.1", 3312), $sphinx->setmatchmode (' Sph_match_any '); $res = $sphinx->query (' Man ', "cetsix"); Var_dump ($res);? >

The database is encoded as follows:
mysql> SHOW CREATE TABLE cetsix    , +--------+---------------------------------------------------| Table  | Create table+--------+---------------------------------------------------| Cetsix | CREATE TABLE ' cetsix ' (  ' id ' smallint (5) unsigned not NULL auto_increment,  ' word ' varchar (255) is not NULL,  ' mea Ning ' varchar (255) NOT NULL,  ' lx ' text not NULL,  PRIMARY KEY (' id ')) engine=myisam auto_increment=13325 DEFAULT CH Arset=utf8 |+--------+---------------------------------------------------

The results can be returned at the command line:

C:\windows\system32>e:\codeedit\php\ciba\niujin-alpha\sphinx\bin\search.exe--c
Onfig E:\CodeEdit\php\ciba\niujin-alpha\sphinx\sphinx.conf Mans
Coreseek fulltext 3.2 [Sphinx 0.9.9-release (r2117)]
Copyright (c) 2007-2011,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)

Using config file ' E:\CodeEdit\php\ciba\niujin-alpha\sphinx\sphinx.conf ' ...
Index ' cetsix ': Query ' man ': returned 199 matches of 199 all in 0.001 sec

displaying matches:
1. document=4, Weight=1
2. document=10, Weight=1
3. document=24, Weight=1
4. document=45, Weight=1
5. document=186, Weight=1
6. document=193, Weight=1
7. document=239, Weight=1
8. document=240, Weight=1
9. document=394, Weight=1
document=454, Weight=1
document=466, Weight=1.
document=483, Weight=1
document=514, Weight=1
document=543, Weight=1
document=653, Weight=1
document=750, Weight=1
document=930, Weight=1

The service also starts normally. I don't know where it went wrong.


Reply to discussion (solution)

Read the manual and solve it, send the split.

I went to the early morning to see someone deliver points.

I got it!

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.