Search code examples
sphinx

SphinxQL - offset out of bounds


I have a strange issue. I want to have an offset in my query, unfortunately it throws an offset out of bounds (offset=2000, max_matches=1000) exception when I go above 1000. I used LIMIT 2000, 10 in this example.

I added max_matches = 100000 to the searchd section of the config file and restarted the service, unfortunately, that does not fix the issue. I am not sure why that is.

Version: Sphinx 3.1.1


Solution

  • When you start Sphinx 3.1.1 with max_matches added in the config you should see

    key 'max_matches' was permanently removed from Sphinx configuration. Refer to documentation for details.

    In Sphinx 3 you're supposed to use "option max_matches=N" instead. For example:

    select * from idx limit 2000, 10 option max_matches=100000