P
P
Paka2020-10-21 10:43:19
Sphinx
Paka, 2020-10-21 10:43:19

How to raise brand weight in sphinx search?

SELECT
                  `goods`
                , `title` 
                , `brand_title`
                , `categories_name`
                , weight()
            FROM
                `index`
            WHERE
                 MATCH ('товар')
            OPTION
                ranker          =   expr(' bm25 '),
                field_weights   =   (goods=10)


How to increase the weight of all products with the 'Top' brand?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neol, 2020-10-21
@Paka

ranker =   expr('if(brand_title='Top',100000,1) + bm25 ')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question