D
D
donflash2014-01-16 12:27:49
Sphinx
donflash, 2014-01-16 12:27:49

How to make Sphinx Search look for "*" in the index?

The settings are as follows:

charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435, U+2A

blend_chars = +, U+23, U+2E, U+21, U+28, U+29, U+40, U+24, U+3D, U+3C, U+3E, U+3F, U+25

So. Any dots (.), percentages (%) and other ([email protected]) are searched without problems, but there is no asterisk (*). Shielding enabled.
Where to dig?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Artem Ershov, 2014-01-16
@artemerschow

enable_star = 0 and min_word_len = 1 I guess.
In general, by the way, all of the listed characters are specified as separators, and the asterisk (U + 2A) is simply specified as a valid character.

D
donflash, 2014-01-16
@donflash

enable_star = 0

Oh how you don't want
Twisted in every way, to no avail

K
klirichek, 2014-01-16
@klirichek

Searches for words with an asterisk in the middle.
But the isolated asterisk (where match ('*')) does not want. Moreover, it drops the demon.
Looks like a bug

K
klirichek, 2014-01-17
@klirichek

By the way, enable_star here in any case is not very appropriate. The asterisk in this case will be a special character.
Even after the bug is fixed, all that remains is to create an index-duplicate, where enable_star=0 and manually steer requests for a clean "*" there.

A
Artem Ershov, 2014-01-17
@artemerschow

There is another perverted option, of course...) You can translate all the asterisks into html code *and then search in the same way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question