I
I
Ilya Plotnikov2014-11-12 13:46:48
Sphinx
Ilya Plotnikov, 2014-11-12 13:46:48

How to configure sphinx to search for products by price list?

I'm trying to collect prices for items. I take a lot of yml and drive it into the database. Product names are like this

Планшет ASUS Transformer Pad TF 303 CL 16 Gb LTE Dock синий (90 NK 0141-M 00920)               |
| Мобильный телефон Samsung GALAXY S5 mini SM-G 800 F синий                                      |
| Мобильный телефон Samsung GALAXY S5 mini SM-G 800 F черный                                     |
| Мобильный телефон Samsung GALAXY S5 mini SM-G 800 F золотой                                    |
| Мобильный телефон Samsung GALAXY S5 mini SM-G 800 F белый                                      |
| Мобильный телефон Samsung Galaxy Note 3 Neo Lite SM-N 7500 ZWASER белый                        |
| Мобильный телефон Samsung GALAXY Note 3 Neo LTE SM-N 7505 зеленый                              |
| Планшет Lenovo IdeaTab A 3300 8Gb 3G (59426082)                                                |
| Планшет Wexler ULTIMA 7 3G 8Gb черный                                                          |
| Планшет Wexler ULTIMA 7 3G 16 Gb черный                                                        |
| Планшет Wexler TAB A 740+3G 4Gb черный                                                         |
| Планшет Wexler TAB A 742+3G 4Gb черный

My products are named simply
Samsung GALAXY S5 mini
Wexler TAB A 742
ASUS Transformer Pad TF 303 CL

With goods like Samsung, it turns out that often the model code is indicated in yml. For example Samsung galaxy gt9092 s4. Tell me, how best to configure sphinx to search through such strings in order to select the maximum number of matches, but at the same time not make an erroneous choice?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DonRai, 2014-11-20
@DonRai

min_word_len = 2  # Минимальная длина индексируемого слова
index_exact_words = 1 # Храним и оригинальное слово в индексе
expand_keywords = 1 # Расширяем поисковый запрос до трех запросов

And you will collect the largest number of matches, but there will probably be a lot of garbage. You need to play around with the settings to find the one that suits you best.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question