I'm new to thinking-sphinx and like it a lot so far. But I'm seeing
incorrect results.
The Item model has a boolean column, current_version, which I'm
attempting to wrap into a sphinx_scope. But it appears both the
sphinx_scope and search method are incorrect.
Here is my index definition and scope:
define_index do
indexes keywords
has current_version
end
sphinx_scope(:current_versions) {
{:with => {:current_version => 1}}
}
The following queries were executed right after running "rake
ts:rebuild" (there should be 1101 current versions).
Plain SQL and ActiveRecord is correct:
select count(*) 'current_versions' from items where current_version
= 1;
=> 1101
Item.find(:all, :conditions => {:current_version => true}).length
=> 1101
ThinkingSphinx is wrong:
Item.search.count
=> 20
Item.current_versions.count
=> 20
Any ideas why I only get 20 results?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.