Answer the question
In order to leave comments, you need to log in
How to make a 'like' condition in Sphinx?
For example, there is a date column:
2017-11-04
2017-11-17
2017-11-17
2017-01-01
2020-11-04
You need to get all the dates "11-04" of all years, or roughly speaking with the LIKE condition "%-11-04"
Answer the question
In order to leave comments, you need to log in
For text fields, you can enable infix indexing, then by increasing the size of the index, you can write something like *-11-04
. But it's better to make three separate attributes and search for the exact expression month=11 and day=4
. There is also a function for unpacking the date.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question