Answer the question
In order to leave comments, you need to log in
How to set this up on Sphinx?
Sphinx search is connected to the online store. By default, to find a product, you need to enter the full name of the product or its compatible model, which is in the product description. If you enter an incomplete name, then the search will return nothing at all. There is an option to enter several characters and put an * (asterisk) at the end, then sphinx finds all options that start before the asterisk.
Tell me how to set up the search so that you do not have to enter the * sign at the end each time. You need to do this: the client starts writing in the search and he should already be getting options for the found, i.e. as if after each entered character is indicated by *.
Please tell me how this can be done?
Answer the question
In order to leave comments, you need to log in
# for searching *query*
min_infix_len = 3
# for searching query*
# min_prefix_len = 3 #Allows
using asterisks in queries, for example, the query *pr* will find prospectus, hello, approximation, etc.
enable_star = 1
# Automatically expands the search query to three requests
expand_keywords = 1
PS
min_infix_len or min_prefix_len
If you specify two parameters, then there will be an error.
the easiest way is in the background - if the result is zero - add an asterisk to the request
, but in a normal way - you need to be prepared
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question