How to look up words in sphinx?

How to look up words in Sphinx ?

conf:

source base {
 type = mysql
 sql_host = 0.0.0.0
 sql_user = user
 sql_pass = pass
 sql_db = base
 sql_port = 3306 # optional, default is 3306
 sql_query_pre = SET NAMES utf8
}

source src_videos: base {

 sql_range_step = 1000

 sql_query_range = SELECT MIN(id), MAX(id) FROM table

 sql_query = \
 SELECT title, description, tags, UNIX_TIMESTAMP(date) as date, other fields FROM table WHERE id BETWEEN $start AND $end

 sql_attr_string = title
 sql_attr_string = description
 sql_attr_string = tags
 sql_attr_timestamp = date
}

index table {
 source = src_videos
 path = C:/sphinx/data/table/data_index
 morphology = stem_enru
 dict = keywords
 index_exact_words = 1
 expand_keywords = 1
 min_word_len = 1
 min_prefix_len = 3

}

indexer {
 mem_limit = 200M
}

searchd {

 listen = 9312

 listen = 127.0.0.1:9306:mysql41


 log = C:/sphinx/log/searchd.log
 query_log = C:/sphinx/log/query.log

 read_timeout = 5
 max_children = 30
 pid_file = C:/sphinx/log/searchd.pid
 seamless_rotate = 1
 preopen_indexes = 1
 unlink_old = 1
 workers = threads # for RT to work
 binlog_path = C:/sphinx/data
}


PHP FILE:

$pdo = new PDO('mysql:host=127.0.0.1;port=9306');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $pdo->query("SELECT * FROM table WHERE MATCH('search phrase or one word')");
$results = $stmt->fetchAll();
var_dump($results);


If you change MATCH outputs all in a row - first by default:

$stmt = $pdo->query("SELECT * FROM table WHERE MATCH(")");


there is no difference in the word - language.
April 3rd 20 at 18:52
1 answer
April 3rd 20 at 18:54
if you believe the developers, the
sphinxsearch.com/docs/current/conf-min-word-len.html
min_word_len
Minimum indexed word length. Optional, default is 1 (index everything).
the problem is that "PECs" is not "stove". here "PEC*" equal to "stove".

read here

Find more questions by tags PHPSphinx