I have updated my searching fields records with thinking_sphinx gem and I have configured it. It is working fine but the problem, It is only displaying 20 records which is default. How to change those thing to make more records visible on view..
I have updated my searching fields records with thinking_sphinx gem and I have configured
Share
Neutrino is almost correct…
Firstly, it’s worth noting that Sphinx (and so, Thinking Sphinx) always paginates requests, and the default page size is 20. If you’d like to change that, you can pass in
:per_page => 30or similar to get the number of records per page that you’d like.Secondly, Sphinx (by default) limits the total number of available search results to 1000 by default. This is what Neutrino was pointing out – if you set max_matches, you can increase that value. However, you will also need to specify a value for
:max_matchesin your search call as well.You will need to stop/re-index/restart when you change values in your
config/sphinx.ymlfile – there’s a single rake task that does this:This will ensure that the generated configuration file is up-to-date, and the Sphinx daemon is aware of the changes.