2012-06-18 51 views
2

我想用獅身人面像我project.And我想用RT指數和sphinxQL.But我不能使用通配符query.Does任何人有什麼建議?SphinxQL通配符

這是我的sphinx.conf: 索引testrt

{ 
    type     = rt 
    path     = /usr/local/sphinx/var/data/testrt 
    charset_type   = utf-8 
    min_infix_len   = 1 
    enable_star    = 1 
    rt_field    = name 
    rt_attr_string   = game 

}

INSERT: 
insert into testrt values(1,'sphinx','sphinx'); 

查詢行,1行受影響(0.02秒)

mysql> select * from testrt; 

+ --- --- + -------- + -------- + | id |重量|遊戲| + ------ + -------- + -------- + | 1 | 1 | sphinx | + ------ + -------- + -------- + 1行集(0.01秒)

mysql> select * from testrt where match('sphinx'); 

+ ------ + -------- + -------- + | id |重量|遊戲| + ------ + -------- + -------- + | 1 | 1500 | sphinx | + ------ + -------- + -------- + 1行集(0.00秒)

mysql> select * from testrt where match('sphin*'); 

空集(0.00秒)

mysql> select * from testrt where match('sphin\\*'); 

空集(0.02秒)

我希望你能幫我個favor.Thank你!

+0

它不應該是''%,而不是'*'? – MarioDS

+0

獅身人面像使用*作爲通配符。 Mysql LIKE使用% – barryhunter

回答