Tom Copeland's Recent Posts

RSS Feeds

« Rails, ActiveRecord, and time ranges | Main | developer.com Java tool of the year award »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451d3c069e2011278e0ac2a28a4

Listed below are links to weblogs that reference Sphinx, Riddle, and will_paginate:

Comments

Why wouldn't you just use ThinkingSphinx? It's a wrapper on the Riddle API written by the developer of the Riddle API and its result sets already have a will_paginate compatible interface.

@rein - yeah, I haven't used Thinking Sphinx, although I've used UltraSphinx and I hear those two are kind of similar. In the past I've used Riddle directly since Sphinx was running on different machine and the indexer was running on it's own schedule... also, the Riddle API seems pretty straightforward. Nothing against Thinking Sphinx, of course.... whatever works!

Maybe I'm missing something here, but doesn't blindly adding 1 to total_results / page_size suggest that on average 1 in page_size times the total pages count will be off by one. Wouldn't it be better to check if total results % page size == 0 and if not then add 1?

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.