sphinx - SphinxQL request similar to LIKE in SQL -


i wondered got different results of following requests:

sphinxql:

select ticket_id message match('*test*') limit 0, 100000 option max_matches = 100000 

result 221 rows

sql:

select * `ticket_logs` message '%test%' 

result 321 rows

what should sphinxql request same result sql-request (321 rows).

btw: code of sphinx index next:

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 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/ } 

you dont appear have min_infix_len defined in config

http://sphinxsearch.com/docs/current.html#conf-min-infix-len

... need explicitly enable 'wildcard' queries.

that give closer results.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -