Answer the question
In order to leave comments, you need to log in
How can I make Sphinx digest a request with a space, without a space, with a hyphen instead of a space?
Friends, hello. Sorry for the noob questions, but we're implementing Sphinx for the first time. His speed is insane. But here's the problem: we do a search in the store and very different spellings of product models are possible there. For example, the product card says “SuperScan VX105”, and the user is just looking for “superscan 105” - the product is not found. Or, say, the card says "IC300SC", but you want this product to be included in the queries "ic 300 sc", "ic-300", etc.
Now we are already thinking about writing our own query preprocessor, which, in the case of a completely empty result, would try to parse the query into different combinations of alphanumeric substrings included in it. But after all, probably, this problem is somehow more elegantly solved at the level of Spninx itself. Tell me what can be done on this topic.
Answer the question
In order to leave comments, you need to log in
twist the sphinx config 8)
there are symbols that are not indexed ,
put your strange symbols in them
You can also read my article
habrahabr.ru/post/147745
SELECT `o`.`title`, `f`.`value` AS `filling`, `t`.`value` AS `taste`
FROM `orders` AS `o`
LEFT JOIN (
SELECT `of`.`id_order` AS `id_order`, `of`.`value` AS `value`
FROM `order_fields` AS `of`
JOIN `fields` AS `f` ON `f`.`name` = 'Начинка' AND `f`.`id` = `of`.`id_field`
) AS `f` ON `f`.`id_order` = `o`.`id`
LEFT JOIN (
SELECT `of`.`id_order` AS `id_order`, `of`.`value` AS `value`
FROM `order_fields` AS `of`
JOIN `fields` AS `f` ON `f`.`name` = 'Вкус' AND `f`.`id` = `of`.`id_field`
) AS `t` ON `t`.`id_order` = `o`.`id`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question