I
I
Ilya Malinovsky2019-04-05 08:42:33
Sphinx
Ilya Malinovsky, 2019-04-05 08:42:33

How to replenish the dictionary for category auto-detection?

The essence of the task is as follows, there is a site and it has many categories, you need to make sure that when loading a product with a description, based on it, the site automatically selects and substitutes the desired category for it.
To do this, I decided to use Sphinx and for this I made a separate table in which I started 3 fields (ID, BODY, SECTION_ID) in BODY the text is stored, and in SECTION_ID a link to the category.
Initially, I compiled a database based on the descriptions of existing products, but it so happened that the site is new and there are a lot of products in only 5 categories out of 60. As a result, I got that auto-detection gives out more often those categories in which there are most products.
As a result, I decided that indexing the text of goods is not particularly suitable and I need to somehow fill the dictionary of categories.
The category is called "Stamps -> Russian -> Russian Empire (1857-1917)". Are there any options to automatically populate a category dictionary with only such a name? And I will be glad if someone tells you the optimal Sphinx setting for this kind of search (Search query can be more than 1000 characters long)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2019-04-05
@SilenceOfWinter

Such things are done based on the characteristics of the product i.e. "Stamps" - type of goods, Russian - country, Russian Empire (1857-1917) - date.
so that this does not happen, set the weight of the categories more than that of the products, I won’t tell you how it is implemented in Sphinx, I can only show you on abstract examples of such a morpho search.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question