I currently use Sphinx search, and am attempting to sort my results in time segments mode, which means time segments in descending order and then relevance in descending order.

Currently I use SPH_SORT_RELEVANCE, and it works fine. But every time I switch to time segments mode, it returns zero results. I am setting sql_date_column in my sphinx.conf file.

What am I doing wrong? Am I missing something?

Thanks!

Hey guys,

I was able to figure it out. I was under the (false) assumption that SPH_SORT_TIME_SEGMENTS figured out the time based on what was set in the sql_date_column. However, it turns out that you have to manually pass in which field you want to use for time, when setting the SortMode.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.