我很想知道我得到了以下要求的不同结果:
SphinxQL:
SELECT ticket_id FROM message WHERE MATCH('*test*') LIMIT 0, 100000 OPTION max_matches = 100000
结果是221行
SQL:
SELECT * FROM `ticket_logs` WHERE message LIKE '%test%'
结果是321行
SphinxQL请求应该与SQL请求(321行)获得相同的结果。
BTW:Sphinx索引的代码是下一个:
source ticket_logs
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass =
sql_db = test_db
sql_port = 3306
sql_query_pre = SET NAMES utf8
}
source messages : ticket_logs
{
sql_query = \
SELECT id, ticket_id, message FROM ticket_logs
sql_field_string = ticket_id
sql_field_string = message
}
index message
{
source = messages
path = c:/sphinx/data/index/message
}
searchd
{
listen = 9306:mysql41
pid_file = c:/sphinx/data/searchd.pid
log = c:/sphinx/data/log/searchd.log
query_log = c:/sphinx/data/log/query.log
binlog_path = c:/sphinx/data/binlog/
}
答案 0 :(得分:1)
您似乎未在配置中定义def lupa():
elements = browser.find_elements_by_css_selector("a[onclick='return Go(event, 2)'] > img[title='Details']")
for element in elements:
#element.click()
element.send_keys(Keys.SPACE)
time.sleep(1)
http://sphinxsearch.com/docs/current.html#conf-min-infix-len
...你需要它来明确启用“通配符”#39;查询。
这会给你更接近的结果。