MilkSucker
Примерно вот такой конфиг:
source pictures : te_db
{
sql_query = \
SELECT \
p.id, c.title category_title, GROUP_CONCAT(ch.name SEPARATOR ' ') names, GROUP_CONCAT(tags_names.name SEPARATOR ' ') tags, IF(p.is_animated=1, 'gif', '') gif, p.filename, p.source, p.item_weight, p.hash, p.added date, p.mime, 'picture' item_type \
FROM \
pictures p \
LEFT JOIN categories c ON p.category_id=c.id \
LEFT JOIN tags ON tags.item_id = p.id AND tags.item_type = 'picture' \
LEFT JOIN tags_ids ON tags_ids.id = tags.tag_id \
LEFT JOIN characters ch ON ch.id = tags_ids.tag_id AND tags_ids.tag_type = 'character' \
LEFT JOIN tags_names ON tags_names.id = tags.tag_id AND tags_ids.tag_type = 'common' \
WHERE p.status = 1 AND c.status IN(1,4,5) AND p.gallery_id IN (SELECT base_gallery_id FROM categories) \
GROUP BY tags.item_id, p.id;
sql_attr_string = item_type
sql_attr_float = item_weight
sql_attr_string = hash
sql_attr_string = mime
sql_attr_string = date
sql_attr_string = category_title
sql_attr_string = names
sql_attr_string = tags
sql_ranged_throttle = 0
}
index pictures
{
source = pictures
path = /usr/local/var/data/pictures # Distribution Dependant, VALIDATE
docinfo = extern
mlock = 0
morphology = none
index_exact_words = 1
min_word_len = 2
html_strip = 1
}
получается ~100к вхождений
делаю вот такой поиск:
$cl = new \Sphinx\SphinxClient();
$cl->SetServer(SPHINX_IP, SPHINX_PORT );
$cl->SetConnectTimeout(1);
$cl->SetArrayResult (true);
$cl->SetRankingMode(SPH_RANK_PROXIMITY_BM25);
$cl->SetMatchMode(SPH_MATCH_EXTENDED);
$result = $cl->Query("detective", "pictures");
Ничего не находит. Делаю indexer --dump-rows, открываю результат, ручками ищу detective - все находит:
INSERT INTO rows_pictures VALUES ('526419', 'Detective Conan', 'Ran Mouri', '', '', '1465234%20-%20Detective_Conan%20Ran_Mouri%20Sonoko_Suzuki.jpg', '', '0', 'a43b12829c0c067bfc97af04ec6dabcb', '2014-10-24 05:52:22', 'jpg', 'picture');
INSERT INTO rows_pictures VALUES ('526593', 'Detective Conan', 'Ran Mouri', '', '', '1313029%20-%20Detective_Conan%20Ran_Mouri.jpg', '', '3', 'b3444ae8268748fc1b292e0ac89b69c5', '2014-10-24 06:42:16', 'jpg', 'picture');
INSERT INTO rows_pictures VALUES ('526595', 'Detective Conan', 'Ran Mouri', '', '', '1310998%20-%20Detective_Conan%20Ran_Mouri.jpg', '', '0', 'c07adc83a71cb9b574049ed21ad101c1', '2014-10-24 06:42:26', 'jpg', 'picture');
От чего такое может быть?